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: [PATCH] PR ld/15365: Restrict __ehdr_start's export class (was: RE: [COMMITTED PATCH] Use __ehdr_start, if available, as fallback for AT_PHDR.)


On Thu, 25 Apr 2013, Roland McGrath wrote:

> I think STV_HIDDEN is fine for __ehdr_start.  I made it STV_DEFAULT because
> that's what's done for similar magic symbols such as __start_section_name.
> IMHO the linker(s) should be consistent and produce STV_HIDDEN for those
> too, but that's not my call (and I didn't care to pursue that unrelated
> issue when I was implementing __ehdr_start).

 I agree the other symbols should observe the same export rule.

> The libc change is fine regardless of the resolution of binutils issues.
> (It's not a material optimization for any target I understand, since it's
> only in code that's compiled non-PIC anyway.  But I concur about its
> correctness as a documentation of intent.)  Go ahead and commit that.

 FAOD, "traditional" SVR4 MIPS code is always PIC, even if built for an 
executable, be it dynamic or static, which is sort of why this linker 
problem triggered (otherwise we wouldn't have all of this GOT business).  
That's how the ABI been designed and what was the only way to build 
software on Linux until the "non-PIC abicalls" ABI modification was 
developed in 2008 (and still is on IRIX).

 And as I previously noted, if MIPS16 or microMIPS code was built like 
this, then it could benefit from the PC-relative addressing instructions 
available there (ADDIUPC, LWPC, etc.), but typically it is not and I 
reckon as a result the toolchain may not be smart enough to make this 
optimisation (there may be suitable relocations missing, etc.).

 I have committed the glibc change now, thanks for your review.

  Maciej


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