aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-10-15 14:57:55 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-10-15 14:57:55 +0000
commitecca98713a19ac7aac31886b4b15b806e63d9a99 (patch)
tree8606d4daeccd04e698371f934ba62278dd283d25 /ld/ld.texinfo
parentff0929e51c0e9c26e0cf1e6b7229803ccd7cc769 (diff)
downloadgdb-ecca98713a19ac7aac31886b4b15b806e63d9a99.zip
gdb-ecca98713a19ac7aac31886b4b15b806e63d9a99.tar.gz
gdb-ecca98713a19ac7aac31886b4b15b806e63d9a99.tar.bz2
bfd/
2005-10-15 H.J. Lu <hongjiu.lu@intel.com> PR ld/1467 * elf-bfd.h (_bfd_elf_match_sections_by_type): New. (_bfd_generic_match_sections_by_type): New. Defined. * elf.c (_bfd_elf_match_sections_by_type): New. * libbfd-in.h (_bfd_generic_match_sections_by_type): New. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. * libbfd.c (_bfd_generic_match_sections_by_type): New. * targets.c (BFD_JUMP_TABLE_LINK): Initialize _bfd_match_sections_by_type with _bfd_generic_match_sections_by_type. (bfd_target): Add _bfd_match_sections_by_type. ld/ 2005-10-15 H.J. Lu <hongjiu.lu@intel.com> PR ld/1467 * emultempl/elf32.em: Include "elf-bfd.h". (gld${EMULATION_NAME}_place_orphan): Check section type and don't use section name for ELF input sections. * ld.texinfo: Document orphan section processing. * ldlang.c (lang_output_section_find_by_flags): Match section types by calling bfd_match_sections_by_type.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo17
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 238fde9..d7673fd 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -4442,6 +4442,7 @@ expressions.
@menu
* Constants:: Constants
* Symbols:: Symbol Names
+* Orphan Sections:: Orphan Sections
* Location Counter:: The Location Counter
* Operators:: Operators
* Evaluation:: Evaluation
@@ -4503,6 +4504,22 @@ Since symbols can contain many non-alphabetic characters, it is safest
to delimit symbols with spaces. For example, @samp{A-B} is one symbol,
whereas @samp{A - B} is an expression involving subtraction.
+@node Orphan Sections
+@subsection Orphan Sections
+@cindex orphan
+Orphan sections are sections present in the input files which
+are not explicitly placed into the output file by the linker
+script. The linker will still copy these sections into the
+output file, but it has to guess as to where they should be
+placed. The linker uses a simple heuristic to do this. It
+attempts to place orphan sections after non-orphan sections of the
+same attribute, such as code vs data, loadable vs non-loadable, etc.
+If there is not enough room to do this then it places
+at the end of the file.
+
+For ELF targets, the attribute of the section includes section type as
+well as section flag.
+
@node Location Counter
@subsection The Location Counter
@kindex .