aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-11-10 04:26:55 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-11-10 04:27:51 -0800
commit18954b29a1b49c9ffbfef925fdac4a23194ef82d (patch)
tree19802b087c9cb9ea480410676f2aca2d47d3a789 /bfd/elf64-x86-64.c
parent2d5da47320d6d22a58b793801999ba33c43c758f (diff)
downloadgdb-18954b29a1b49c9ffbfef925fdac4a23194ef82d.zip
gdb-18954b29a1b49c9ffbfef925fdac4a23194ef82d.tar.gz
gdb-18954b29a1b49c9ffbfef925fdac4a23194ef82d.tar.bz2
Handle x86 VTINHERIT/VTENTRY relocs when deleting relocations
* elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT and VTENTRY relocations when deleting relocations. * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index dfa1276..8e00362 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -3904,7 +3904,11 @@ elf_x86_64_relocate_section (bfd *output_bfd,
r_type = ELF32_R_TYPE (rel->r_info);
if (r_type == (int) R_X86_64_GNU_VTINHERIT
|| r_type == (int) R_X86_64_GNU_VTENTRY)
- continue;
+ {
+ if (wrel != rel)
+ *wrel = *rel;
+ continue;
+ }
if (r_type >= (int) R_X86_64_standard)
{