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: RFC: Add GNU_PROPERTY_NEED_PHDRS


Hi,

On Tue, 2 Oct 2018, H.J. Lu wrote:

> > Yes, and it's a hack.  This section isn't necessary, it merely is the 
> > easiest (?) way you found to force ld to create the PT_LOAD segment 
> > you want.  What about linker scripts that filter out all .note 
> > sections?  You _still_ want the phdrs to be mapped in that case.  You 
> > basically replace the current state (where the phdrs are mapped by 
> > accident) with a different state that still only works by accident.  
> > It would be better to make this work by design not accident.
> 
> If linker script discards a section, all bets are off.  Anything can 
> happen.

I disagree, but even if I'd agree your solution still is more accidental 
than by design.  You want to guarantee something about program headers, so 
any solution that doesn't do anything specific about/with program headers 
is similarly accidental.


Ciao,
Michael.


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