RFC: Add SHT_GNU_PHDRS

Michael Matz matz@suse.de
Fri Sep 28 12:32:00 GMT 2018


Hi,

On Thu, 27 Sep 2018, Florian Weimer wrote:

> I'm now under the impression that the bits that are PT_LOAD'ed all need 
> to be covered by (allocated) sections.

That is wrong.  Szabolcs is reading too much into some careless wording of 
the ELF text that simply tries to convey the idea that usually segments 
contents are the result of some sections combined by the link editor.  
Sections are purely optional in the execution view.

This section hack isn't necessary at all for what we need.  The link 
editor merely needs to ensure that the program headers are part of some 
loadable segment, either by placing it not at the start of the file 
(though that would mean the ELF header isn't part of the loaded image, 
which is desirable to have), or by creating such loadble segment if 
necessary.

No gABI extensions are needed.


Ciao,
Michael.



More information about the Binutils mailing list