aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-05-26 22:18:22 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-05-26 22:18:22 +0000
commit68d7e96a436ae00396227dca4668999b7a4bceef (patch)
tree89648b1ac83038763b76c64e310e532977c816eb /bfd/elf64-x86-64.c
parentf504f079c05825a32433b0e9007485c8dd259c05 (diff)
downloadgdb-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/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index b82bcd1..6b7f17a 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -983,25 +983,6 @@ elf64_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd,
return TRUE;
}
-/* Returns true if the hash entry refers to a symbol
- marked for indirect handling during reloc processing. */
-
-static bfd_boolean
-is_indirect_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);
-
- return h->type == STT_GNU_IFUNC
- && (bed->elf_osabi == ELFOSABI_LINUX
- /* GNU/Linux is still using the default value 0. */
- || bed->elf_osabi == ELFOSABI_NONE);
-}
-
/* Look through the relocs for a section during the first phase, and
calculate needed space in the global offset table, procedure
linkage table, and dynamic reloc sections. */
@@ -1860,7 +1841,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
return FALSE;
}
}
- else if (is_indirect_symbol (info->output_bfd, h)
+ else if (_bfd_elf_is_ifunc_symbol (info->output_bfd, h)
&& h->dynindx == -1
&& ! h->forced_local)
{
@@ -2718,7 +2699,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
&& h->dynindx != -1
&& ! h->forced_local
&& ((struct elf64_x86_64_link_hash_entry *) h)->dyn_relocs != NULL
- && is_indirect_symbol (output_bfd, h))
+ && _bfd_elf_is_ifunc_symbol (output_bfd, h))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& h != NULL
@@ -2814,7 +2795,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
&& h != NULL
&& h->dynindx != -1
&& ! h->forced_local
- && is_indirect_symbol (output_bfd, h)
+ && _bfd_elf_is_ifunc_symbol (output_bfd, h)
&& elf_section_data (input_section)->indirect_relocs != NULL
&& elf_section_data (input_section)->indirect_relocs->contents != NULL)
sreloc = elf_section_data (input_section)->indirect_relocs;