aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2008-01-11 09:11:18 +0000
committerTristan Gingold <gingold@adacore.com>2008-01-11 09:11:18 +0000
commitac69cbc672a0702152d34bac2da436dcee2e5346 (patch)
tree6ffc8a7b8272f96af39210413806e543b28c186b /ld/ld.texinfo
parent7dda2462a7035e0c9cc9706abfda31861c551b14 (diff)
downloadgdb-ac69cbc672a0702152d34bac2da436dcee2e5346.zip
gdb-ac69cbc672a0702152d34bac2da436dcee2e5346.tar.gz
gdb-ac69cbc672a0702152d34bac2da436dcee2e5346.tar.bz2
ld:
2008-01-11 Tristan Gingold <gingold@adacore.com> Eric Botcazou <ebotcazou@adacore.com> * ldlang.c (lang_end): Warns if the entry point is not found when --gc-sections. Emit an error if no root is specified when --gc-sections -r. * ld.texinfo (Options): Document that --gc-sections is compatible with -r and -q. * ldmain.c (main): Do not error out if -r and --gc-sections. * scripttempl/elf.sc: Emit ENTRY command only if relocating. ld/testsuite: 2008-01-11 Tristan Gingold <gingold@adacore.com> * lib/ld-lib.exp (check_gc_sections_available): Now available on VxWorks. * ld-gc: New directory for testing --gc-sections. * ld-gc/gc.c: New file. * ld-gc/gc.exp: New file. * ld-gc/noent.s: New file. * ld-gc/noent.d: New file.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo8
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 7cbc26a..7d77d1c 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -1280,8 +1280,7 @@ it ends in a @code{.exe} suffix.
@item --gc-sections
@itemx --no-gc-sections
Enable garbage collection of unused input sections. It is ignored on
-targets that do not support this option. This option is not compatible
-with @samp{-r} or @samp{--emit-relocs}. The default behaviour (of not
+targets that do not support this option. The default behaviour (of not
performing this garbage collection) can be restored by specifying
@samp{--no-gc-sections} on the command line.
@@ -1295,6 +1294,11 @@ 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}.
+This option can be set when doing a partial link (enabled with option
+@samp{-r}). In this case the root of symbols kept must be explicitely
+specified either by an @samp{--entry} or @samp{--undefined} option or by
+a @code{ENTRY} command in the linker script.
+
@kindex --print-gc-sections
@kindex --no-print-gc-sections
@cindex garbage collection