From 2d5da47320d6d22a58b793801999ba33c43c758f Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 9 Nov 2015 23:49:02 -0800 Subject: 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. --- bfd/elf32-i386.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bfd/elf32-i386.c') diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 6c353e9..ee45ed1 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. */ -- cgit v1.1