This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: use objcopy to patch or poke an elf file?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]