From f70656b2604eff12cea2e9bef27c1e00a3077f30 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 6 Oct 2017 00:29:16 -0700 Subject: x86: Add GENERATE_RELATIVE_RELOC_P Add GENERATE_RELATIVE_RELOC_P which returns TRUE if dynamic relative relocation should be generated. * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New. * elf32-i386.c (elf_i386_relocate_section): Use it. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. --- bfd/elf64-x86-64.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'bfd/elf64-x86-64.c') diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 5a9e3fd..d443551 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -2797,10 +2797,7 @@ do_ifunc_pointer: as -1 | 1 still is -1. */ h->got.offset |= 1; - if (h->dynindx == -1 - && !h->forced_local - && h->root.type != bfd_link_hash_undefweak - && bfd_link_pic (info)) + if (GENERATE_RELATIVE_RELOC_P (info, h)) { /* If this symbol isn't dynamic in PIC, generate R_X86_64_RELATIVE here. */ -- cgit v1.1