aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-06 00:29:16 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-06 00:32:43 -0700
commitf70656b2604eff12cea2e9bef27c1e00a3077f30 (patch)
tree7af723e29d43739bfa8ade510660da0c24f337ba /bfd/elf32-i386.c
parent1f92404c505db7ca2255dad73647889234013a0a (diff)
downloadgdb-f70656b2604eff12cea2e9bef27c1e00a3077f30.zip
gdb-f70656b2604eff12cea2e9bef27c1e00a3077f30.tar.gz
gdb-f70656b2604eff12cea2e9bef27c1e00a3077f30.tar.bz2
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.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 25d349c..198732c 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -2531,10 +2531,7 @@ r_386_got32:
htab->elf.sgot->contents + off);
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))
{
/* PR ld/21402: If this symbol isn't dynamic
in PIC, generate R_386_RELATIVE here. */