This is the mail archive of the 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

Ian Lance Taylor <iant <at>> writes:

> On Mon, Apr 22, 2013 at 4:39 AM, Raphael Zulliger
 <zulli73 <at>> wrote:
> >
> > 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?
> I'm fine with it.  Look for uses of is_cident in the gold source code.
> Ian

Thanks for the tip Ian.  In that routine one could easily ignore a
leading ".".  In abstract one might want to handle "." inside the
name, or translate characters (such as "$") allowed in ELF symbols but
not in C (or in some other language), whereby a simple concept starts
to get out of hand; thus:

- Could we assume that standard ELF section names can be mapped to C
identifiers just by mapping the leading "."?

- What mapping would you suggest?  If the leading "." is dropped then
the resulting would collide with a common name (text or data in
particular).  This problem seems unsolvable in general, so should one
make an effort at all (mapping "." to a single underscore for

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