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 /bfd/bfd-in2.h | |
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 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index c723731..5e53956 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -606,6 +606,12 @@ struct bfd_link_needed_list const char *name; }; +enum dynamic_lib_link_class { + DYN_NORMAL = 0, + DYN_AS_NEEDED = 1, + DYN_DT_NEEDED = 2 +}; + extern bfd_boolean bfd_elf_record_link_assignment (bfd *, struct bfd_link_info *, const char *, bfd_boolean); extern struct bfd_link_needed_list *bfd_elf_get_needed_list @@ -620,10 +626,10 @@ extern bfd_boolean bfd_elf64_size_dynamic_sections struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *); extern void bfd_elf_set_dt_needed_name (bfd *, const char *); -extern void bfd_elf_set_dt_needed_soname - (bfd *, const char *); extern const char *bfd_elf_get_dt_soname (bfd *); +extern void bfd_elf_set_dyn_lib_class + (bfd *, int); extern struct bfd_link_needed_list *bfd_elf_get_runpath_list (bfd *, struct bfd_link_info *); extern bfd_boolean bfd_elf32_discard_info |