diff options
author | Alan Modra <amodra@gmail.com> | 2004-03-18 12:50:20 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2004-03-18 12:50:20 +0000 |
commit | 4a43e768f18f325a0e52de37fe69d4a6a764d668 (patch) | |
tree | 5fed3b135f3382db0391e56136eefc09e32929a0 /ld/ld.texinfo | |
parent | 3e4caed2b120cd3930d19c96fc5761f9254946c5 (diff) | |
download | gdb-4a43e768f18f325a0e52de37fe69d4a6a764d668.zip gdb-4a43e768f18f325a0e52de37fe69d4a6a764d668.tar.gz gdb-4a43e768f18f325a0e52de37fe69d4a6a764d668.tar.bz2 |
bfd/
* elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
dyn_lib_class field. Rearrange for better packing.
(elf_dt_soname): Delete.
(elf_dyn_lib_class): Define.
* elf.c (bfd_elf_set_dt_needed_name): Update comment.
(bfd_elf_set_dt_needed_soname): Delete.
(bfd_elf_set_dyn_lib_class): New function.
* elflink.h (add_dt_needed_tag): New function. Split out from..
(elf_link_add_object_symbols): ..here. Rename "name" to "soname".
Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
initialization of soname.
(elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
elf_dt_soname.
* bfd-in.h (enum dynamic_lib_link_class): New.
(bfd_elf_set_dt_needed_soname): Delete.
(bfd_elf_set_dyn_lib_class): Declare.
* bfd-in2.h: Regenerate.
ld/
* ld.texinfo: Add --as-needed doco.
* ldmain.c (as_needed): New global var.
* ldmain.h (as_needed): Declare.
* lexsup.c (option_values): Add OPTION_AS_NEEDED and
OPTION_NO_AS_NEEDED.
(ld_options): Likewise.
(parse_args): Handle them.
* ldlang.h (lang_input_statement_type): Add as_needed field.
* ldlang.c (new_afile): Set p->as_needed.
* emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
(gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
(ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.
* ldlang.c (open_input_bfds): Remove useless cast.
(lang_do_assignments_1): Likewise.
(lang_for_each_input_section): Delete.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 9710f4f..4310c12 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -972,6 +972,18 @@ behaviour from release 2.14 onwards is to reject such input files, and so the @samp{--accept-unknown-input-arch} option has been added to restore the old behaviour. +@kindex --as-needed +@kindex --no-as-needed +@item --as-needed +@itemx --no-as-needed +This option affects ELF DT_NEEDED tags for dynamic libraries mentioned +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. @option{--as-needed} causes DT_NEEDED tags to only be emitted +for libraries that satisfy some reference from regular objects. +@option{--no-as-needed} restores the default behaviour. + @kindex -assert @var{keyword} @item -assert @var{keyword} This option is ignored for SunOS compatibility. |