This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: use objcopy to patch or poke an elf file?
- From: Nick Clifton <nickc at redhat dot com>
- To: John Breitenbach <breiten at lexmark dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 23 Sep 2009 09:51:17 +0100
- Subject: Re: use objcopy to patch or poke an elf file?
- References: <4AB921FF.2060100@lpdev.prtdev.lexmark.com>
Hi John,
I've got a program which contains a const static variable which is
intended to contain a checksum.
Is there a better idea out there?
There already is a checksum creation capability in the linker. (See the
documentation for the --build-id switch in the linker manual). If
none of the methods for computing this value suit your needs then you
could always add code for your own method.
Alternatively how about reading in the checksum from a separate file at
runtime ? Not particularly robust I know, but nice and simple.
Cheers
Nick