This is the mail archive of the
mailing list for the binutils project.
[PATCH 1/3] ld: Orphan section documentation
Make more explicit mention of the fact that orphan sections cause a new
output section to be created. Though this information is clearly
implied in the manual it might not be clear enough.
A user _might_ (incorrectly) think that orphan sections could be
inserted into an existing output section.
* ld.texinfo (Orphan Sections): Add more detail.
ld/ld.texinfo | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index b128451..24504da 100644
@@ -5762,10 +5762,12 @@
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.
+output file, creating a new output section to hold the orphans,
+but it has to guess as to where the new output section 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
If there is not enough room to do this then it places
at the end of the file.