aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-03-18 02:47:03 +0000
committerAlan Modra <amodra@gmail.com>2013-03-18 02:47:03 +0000
commitffa9430db119a35786d64ffa50af9c2c368d210f (patch)
tree5dfa83c0fe14863d865cc98001560a5365108836 /ld/ld.texinfo
parentf7f9535d8d2073ca2040997a16f17944e05ec940 (diff)
downloadgdb-ffa9430db119a35786d64ffa50af9c2c368d210f.zip
gdb-ffa9430db119a35786d64ffa50af9c2c368d210f.tar.gz
gdb-ffa9430db119a35786d64ffa50af9c2c368d210f.tar.bz2
PR ld/12549
bfd/ * elflink.c (elf_link_add_object_symbols): Exclude weak refs when considering whether an --as-needed library is needed. ld/ * ld.texinfo (--as-needed): Update. ld/testsuite/ * ld-elf/pr14862.out: Expect no output.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo13
1 files changed, 8 insertions, 5 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index cc4e735..1f8e34d 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -1143,11 +1143,14 @@ on the command line after the @option{--as-needed} option. Normally
the linker will add a DT_NEEDED tag for each dynamic library mentioned
on the command line, regardless of whether the library is actually
needed or not. @option{--as-needed} causes a DT_NEEDED tag to only be
-emitted for a library that satisfies an undefined symbol reference
-from a regular object file or, if the library is not found in the
-DT_NEEDED lists of other libraries linked up to that point, an
-undefined symbol reference from another dynamic library.
-@option{--no-as-needed} restores the default behaviour.
+emitted for a library that @emph{at that point in the link} satisfies a
+non-weak undefined symbol reference from a regular object file or, if
+the library is not found in the DT_NEEDED lists of other libraries, a
+non-weak undefined symbol reference from another dynamic library.
+Object files or libraries appearing on the command line @emph{after}
+the library in question do not affect whether the library is seen as
+needed. This is similar to the rules for extraction of object files
+from archives. @option{--no-as-needed} restores the default behaviour.
@kindex --add-needed
@kindex --no-add-needed