From 68d7e96a436ae00396227dca4668999b7a4bceef Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 26 May 2009 22:18:22 +0000 Subject: 2009-05-26 H.J. Lu * 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. --- bfd/elflink.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bfd/elflink.c') 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)); +} -- cgit v1.1