diff options
author | Richard Henderson <rth@redhat.com> | 2003-07-18 21:09:28 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2003-07-18 21:09:28 +0000 |
commit | 986a241f8b043a790a63bc4e96bb731973a61ff4 (patch) | |
tree | 83a1a719061def9eab539e87e9de1f84059395d1 /bfd/elf-bfd.h | |
parent | 22b0d388c7f3d6271df8e2193a1c4f4d4a7d973d (diff) | |
download | gdb-986a241f8b043a790a63bc4e96bb731973a61ff4.zip gdb-986a241f8b043a790a63bc4e96bb731973a61ff4.tar.gz gdb-986a241f8b043a790a63bc4e96bb731973a61ff4.tar.bz2 |
* elflink.c (_bfd_elf_dynamic_symbol_p): New.
* elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
(SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
* elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
* elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
* elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
Update all callers to provide the relocation being resolved.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index b118524..7d154fc 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -211,23 +211,12 @@ struct elf_link_hash_entry function symbols not defined in an app are set to their .plt entry, it's necessary for shared libs to also reference the .plt even though the symbol is really local to the shared lib. */ -#define SYMBOL_REFERENCES_LOCAL(INFO, H) \ - (((INFO)->executable \ - || (INFO)->symbolic \ - || (H)->dynindx == -1 \ - || ELF_ST_VISIBILITY ((H)->other) == STV_INTERNAL \ - || ELF_ST_VISIBILITY ((H)->other) == STV_HIDDEN \ - || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) \ - && ((H)->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) +#define SYMBOL_REFERENCES_LOCAL(INFO, H) \ + _bfd_elf_dynamic_symbol_p (H, INFO, 1) /* Will _calls_ to this symbol always call the version in this object? */ -#define SYMBOL_CALLS_LOCAL(INFO, H) \ - (((INFO)->executable \ - || (INFO)->symbolic \ - || (H)->dynindx == -1 \ - || ELF_ST_VISIBILITY ((H)->other) != STV_DEFAULT \ - || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) \ - && ((H)->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) +#define SYMBOL_CALLS_LOCAL(INFO, H) \ + _bfd_elf_dynamic_symbol_p (H, INFO, 0) /* Records local symbols to be emitted in the dynamic symbol table. */ @@ -1506,6 +1495,9 @@ extern bfd_boolean _bfd_elf_adjust_dynamic_symbol extern bfd_boolean _bfd_elf_link_sec_merge_syms PARAMS ((struct elf_link_hash_entry *, PTR)); +extern bfd_boolean _bfd_elf_dynamic_symbol_p + PARAMS ((struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean)); + extern const bfd_target *bfd_elf32_object_p PARAMS ((bfd *)); extern const bfd_target *bfd_elf32_core_file_p |