summaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-05 14:36:58 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-06 00:24:23 -0700
commit2eba97c207399d8b541092a7b0a4428dc02f5cf1 (patch)
tree2558766503cc6a09c263dd788209a7a32c8c6773 /bfd/elf64-x86-64.c
parentdaf1c414a48baf090f005ce4b319b6881d5d6872 (diff)
downloadbinutils-gdb-2eba97c207399d8b541092a7b0a4428dc02f5cf1.tar.gz
Add RESOLVED_LOCALLY_P
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index df91ab80a4e..5a9e3fd6140 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2762,8 +2762,6 @@ do_ifunc_pointer:
relative_reloc = FALSE;
if (h != NULL)
{
- bfd_boolean dyn;
-
off = h->got.offset;
if (h->needs_plt
&& h->plt.offset != (bfd_vma)-1
@@ -2779,21 +2777,12 @@ do_ifunc_pointer:
base_got = htab->elf.sgotplt;
}
- dyn = htab->elf.dynamic_sections_created;
-
- if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
- || (bfd_link_pic (info)
- && SYMBOL_REFERENCES_LOCAL_P (info, h))
- || (ELF_ST_VISIBILITY (h->other)
- && h->root.type == bfd_link_hash_undefweak))
+ if (RESOLVED_LOCALLY_P (info, h, htab))
{
- /* This is actually a static link, or it is a -Bsymbolic
- link and the symbol is defined locally, or the symbol
- was forced to be local because of a version file. We
- must initialize this entry in the global offset table.
- Since the offset must always be a multiple of 8, we
- use the least significant bit to record whether we
- have initialized it already.
+ /* We must initialize this entry in the global offset
+ table. Since the offset must always be a multiple
+ of 8, we use the least significant bit to record
+ whether we have initialized it already.
When doing a dynamic link, we create a .rela.got
relocation entry to initialize the value. This is