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: gold linker: Access section start & end address w/o using a linker script


Thanks.
Is there a chance to enhance gold to better support such use cases? Or is that out-of focus for gold? I'm not familiar with linking internals, but I think that providing additional start/end address symbols for section names starting with a '.' wouldn't be that tricky to be added, right?

On Apr 21, 2013, at 9:42 PM, Ian Lance Taylor <iant@google.com> wrote:

> On Sun, Apr 21, 2013 at 12:27 PM, Raphael Zulliger <zulli73@gmail.com> wrote:
>> Thanks Ian!
>> __start_SECNAME / __stop_SECNAME: I've been googling for something like this almost for hours…
>> 
>> That certainly answers my question for "project specific" section names. But I cant see yet how it solve my question for pre-defined sections like .sbss, .sdata, etc.? Is there another trick I don't know yet? E.g. can I create section-aliasses or something like that? (again, a short google session didn't give useful results)
> 
> Yes, for those sections you do need to use a linker script, or to
> arrange for some file defining the appropriate symbols to be at the
> start and end of your link.
> 
> For specialized purposes like this you do need to use a linker script
> with gold.  gold is optimized to not use a linker script for the
> ordinary case of a hosted system.  It's OK to use a linker script for
> an embedded system.
> 
> Ian


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