This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: emitting "section start" and "section end" symbols in relocatable objects
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Prasad Boddupalli'" <bprasad at cs dot arizona dot edu>, "'binutils'" <binutils at sources dot redhat dot com>
- Date: Tue, 15 May 2007 01:34:54 +0100
- Subject: RE: emitting "section start" and "section end" symbols in relocatable objects
- References: <e8180c7f0705141731w4fc5fadehcdbd9a0a24e4f09@mail.gmail.com>
On 15 May 2007 01:32, Prasad Boddupalli wrote:
> Is it possible to have the compiler or linker (if linking partially
> using -r option) generate symbols for the start address and end
> address of user defined sections in relocatable object files ?
If they're only partially linked, there /is/ no start and end address yet.
You can find out the size of each section, but there's no meaning to asking
what addresses an unrelocated object belongs at.
> They seem to be generated for shared objects. For example, if there is
> a user defined section "set_modmetadata_set", then the symbols
> "__start_set_modmetadata_set" and "__stop_set_modmetadata_set" are
> automatically generated.
Ah, yeh, but those symbols get relocated by ld.so at load time according to
where the data /actually/ ends up.
cheers,
DaveK
--
Can't think of a witty .sigline today....