aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-01-10 01:12:56 +0000
committerAlan Modra <amodra@gmail.com>2008-01-10 01:12:56 +0000
commitd5465ba2e1ed7e45ddd9e9cc2ba64d98afcb0fa7 (patch)
treee654daebab835853184b67a1153b9fa650e2c54a /ld/ld.texinfo
parent77a580f9bad73b7d83384cf1a73ed995cddf2d58 (diff)
downloadgdb-d5465ba2e1ed7e45ddd9e9cc2ba64d98afcb0fa7.zip
gdb-d5465ba2e1ed7e45ddd9e9cc2ba64d98afcb0fa7.tar.gz
gdb-d5465ba2e1ed7e45ddd9e9cc2ba64d98afcb0fa7.tar.bz2
* ld.texinfo (--gc-sections): Describe linker behaviour.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo10
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 4d687e2..7cbc26a 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -1285,6 +1285,16 @@ with @samp{-r} or @samp{--emit-relocs}. The default behaviour (of not
performing this garbage collection) can be restored by specifying
@samp{--no-gc-sections} on the command line.
+@samp{--gc-sections} decides which input sections are used by
+examining symbols and relocations. The section containing the entry
+symbol and all sections containing symbols undefined on the
+command-line will be kept, as will sections containing symbols
+referenced by dynamic objects. Note that when building shared
+libraries, the linker must assume that any visible symbol is
+referenced. Once this initial set of sections has been determined,
+the linker recursively marks as used any section referenced by their
+relocations. See @samp{--entry} and @samp{--undefined}.
+
@kindex --print-gc-sections
@kindex --no-print-gc-sections
@cindex garbage collection