diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2009-10-07 07:25:36 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2009-10-07 07:25:36 +0000 |
commit | 5c1a3f0fa74b2b0cc679d03e4158b4f37ae973f1 (patch) | |
tree | 3c22356e4655f4502c04d3602f380617e17d5b10 /ld/ld.texinfo | |
parent | 700d40ca16eb3ba1ecc1e602cb3eec175bdf70f0 (diff) | |
download | gdb-5c1a3f0fa74b2b0cc679d03e4158b4f37ae973f1.zip gdb-5c1a3f0fa74b2b0cc679d03e4158b4f37ae973f1.tar.gz gdb-5c1a3f0fa74b2b0cc679d03e4158b4f37ae973f1.tar.bz2 |
ld/
* ldlang.c (lang_new_phdr): Check PHDRS and FILEHDR in loadable
segments do not appear after a different loadable segment.
* ld.texinfo (PHDRS): Document order of processing segments.
Document where PHDRS and FILEHDR may appear.
ld/testsuite/
* ld-scripts/phdrs3.d: New.
* ld-scripts/phdrs3.t: New.
* ld-scripts/phdrs3.exp: New.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index e17d3fc..978ae66 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -4710,7 +4710,8 @@ The @var{name} is used only for reference in the @code{SECTIONS} command of the linker script. It is not put into the output file. Program header names are stored in a separate name space, and will not conflict with symbol names, file names, or section names. Each program header -must have a distinct name. +must have a distinct name. The headers are processed in order and it +is usual for them to map to sections in ascending load address order. Certain program header types describe segments of memory which the system loader will load from the file. In the linker script, you @@ -4734,11 +4735,12 @@ segment at all. @kindex FILEHDR @kindex PHDRS -You may use the @code{FILEHDR} and @code{PHDRS} keywords appear after +You may use the @code{FILEHDR} and @code{PHDRS} keywords after the program header type to further describe the contents of the segment. The @code{FILEHDR} keyword means that the segment should include the ELF file header. The @code{PHDRS} keyword means that the segment should -include the ELF program headers themselves. +include the ELF program headers themselves. If applied to a loadable +segment (@code{PT_LOAD}), it must be the first loadable segment. The @var{type} may be one of the following. The numbers indicate the value of the keyword. |