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: extract ELF load address with binutils?


On Mar 18, 2014, at 1:02 PM, Radouch, Zdenek <zradouch@irobot.com> wrote:

> I am writing a firmware updater that takes an ELF executable and needs to extract the RAM data
> and the address to where the data should be loaded. ...
> The question is can I somehow convince one of the binutils to give me the load address alone,
> so that I don't have to invent an algorithm extracting the address from the section dump?

I’m not sure the notion of “THE load address” makes sense.  It may be valid for your specific case, but not in general.  ELF files can have multiple load sections, each of which has a load address.

Normally I would say: look in the program headers.  Each header of type LOAD describes something that’s loaded, and it shows the addresses.

	paul


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