Re: ELF - section to program header mapping



I do not see any PHDRS in linker script vmlinux.lds and more over I thought it was fixed and not build from anything else.
S
On Thu, 2 Nov 2006, John Reiser wrote:

How/who decides which sections goes into which Segement and Program
header in an elf binary?

A linker script decides. For instance: arch/i386/kernel/vmlinux.lds ,
which itself is built from other sources.



--
S
*************************************************************************
"I've never understood how God could expect his creatures
to pick the one true religion by faith - it strikes me as a
sloppy way to run a universe."
Robert A. Heinlein
STRANGER IN A STRANGE LAND
*************************************************************************
.



Relevant Pages

  • Re: ELF - section to program header mapping
    ... ".text:" refers to the section and not PHDRS. ... The answer is that GNU ld has a default linker script ... So that the kernel can ... I have been looking through the lds file and I see no hint of section to segment mapping. ...
    (comp.os.linux.development.system)
  • Re: ELF - section to program header mapping
    ... ".text:" refers to the section and not PHDRS. ... This selection and grouping is controlled by commands in SECTIONS. ... The answer is that GNU ld has a default linker script ... command line does not replace the internal linker script, but augments ...
    (comp.os.linux.development.system)
  • Re: ELF - section to program header mapping
    ... You can view the internal linker script with ``ld --verbose''. ... built-in one does not contain the PHDRS either! ... PHDRS seems to be a special hack that, in a sense, lies outside of the ... knows how to make an ELF header, and assign the sections, which your ...
    (comp.os.linux.development.system)