diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-05-26 22:18:22 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-05-26 22:18:22 +0000 |
commit | 68d7e96a436ae00396227dca4668999b7a4bceef (patch) | |
tree | 89648b1ac83038763b76c64e310e532977c816eb /bfd/elflink.c | |
parent | f504f079c05825a32433b0e9007485c8dd259c05 (diff) | |
download | gdb-68d7e96a436ae00396227dca4668999b7a4bceef.zip gdb-68d7e96a436ae00396227dca4668999b7a4bceef.tar.gz gdb-68d7e96a436ae00396227dca4668999b7a4bceef.tar.bz2 |
2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
* elf32-i386.c (is_indirect_symbol): Renamed to ...
* elflink.c (_bfd_elf_is_ifunc_symbol): This.
* elf32-i386.c (allocate_dynrelocs): Updated.
(elf_i386_relocate_section): Likewise.
* elf64-x86-64.c (allocate_dynrelocs): Likewise.
(elf64_x86_64_relocate_section): Likewise.
* elf64-x86-64.c (is_indirect_symbol): Removed.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 5e36d12..cb5ca09 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -12553,3 +12553,22 @@ _bfd_elf_make_ifunc_reloc_section (bfd * abfd, return reloc_sec; } + +/* Returns true if the hash entry refers to a symbol marked for + indirect handling during reloc processing. */ + +bfd_boolean +_bfd_elf_is_ifunc_symbol (bfd *abfd, struct elf_link_hash_entry *h) +{ + const struct elf_backend_data * bed; + + if (abfd == NULL || h == NULL) + return FALSE; + + bed = get_elf_backend_data (abfd); + + /* GNU/Linux is still using the default value ELFOSABI_NONE. */ + return (h->type == STT_GNU_IFUNC + && (bed->elf_osabi == ELFOSABI_LINUX + || bed->elf_osabi == ELFOSABI_NONE)); +} |