aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-06 00:35:13 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-06 00:37:43 -0700
commitcf1070f1a1ca1f8be1cd88aa6ece55a25e6a887b (patch)
treebf44718b3d9a854ac5ee04c7232924b725c6eee2 /bfd/elf32-i386.c
parentf70656b2604eff12cea2e9bef27c1e00a3077f30 (diff)
downloadgdb-cf1070f1a1ca1f8be1cd88aa6ece55a25e6a887b.zip
gdb-cf1070f1a1ca1f8be1cd88aa6ece55a25e6a887b.tar.gz
gdb-cf1070f1a1ca1f8be1cd88aa6ece55a25e6a887b.tar.bz2
x86: Add POINTER_LOCAL_IFUNC_P/PLT_LOCAL_IFUNC_P
Add POINTER_LOCAL_IFUNC_P which returns TRUE for pointer reference to local IFUNC symbol. Add PLT_LOCAL_IFUNC_P which returns TRUE for PLT reference to local IFUNC symbol. * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New. (PLT_LOCAL_IFUNC_P): Likewise. * elf32-i386.c (elf_i386_relocate_section): Use them. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 198732c..b6c478d 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -2388,9 +2388,7 @@ do_ifunc_pointer:
+ input_section->output_offset
+ offset);
- if (h->dynindx == -1
- || h->forced_local
- || bfd_link_executable (info))
+ if (POINTER_LOCAL_IFUNC_P (info, h))
{
info->callbacks->minfo (_("Local IFUNC function `%s' in %B\n"),
h->root.root.string,
@@ -3732,11 +3730,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd,
rel.r_offset = (gotplt->output_section->vma
+ gotplt->output_offset
+ got_offset);
- if (h->dynindx == -1
- || ((bfd_link_executable (info)
- || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
- && h->def_regular
- && h->type == STT_GNU_IFUNC))
+ if (PLT_LOCAL_IFUNC_P (info, h))
{
info->callbacks->minfo (_("Local IFUNC function `%s' in %B\n"),
h->root.root.string,