summaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-11-09 23:49:02 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-11-10 00:17:59 -0800
commit2d5da47320d6d22a58b793801999ba33c43c758f (patch)
tree55ac4dc8dea5c3b5ae97bc1ac5ab431ef3c8e708 /bfd/elf32-i386.c
parent60f2e42e00083accdcdbdda399534082bf309d1e (diff)
downloadbinutils-gdb-2d5da47320d6d22a58b793801999ba33c43c758f.tar.gz
Properly move kept relocations when deleting relocations
* elf32-i386.c (elf_i386_relocate_section): Properly move kept relocations when deleting relocations. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 6c353e9af84..ee45ed161a5 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -3791,7 +3791,11 @@ elf_i386_relocate_section (bfd *output_bfd,
}
if (bfd_link_relocatable (info))
- continue;
+ {
+ if (wrel != rel)
+ *wrel = *rel;
+ continue;
+ }
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle
it here if it is defined in a non-shared object. */