diff options
Diffstat (limited to 'source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch')
-rw-r--r-- | source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch b/source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch new file mode 100644 index 00000000..99e8b708 --- /dev/null +++ b/source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch @@ -0,0 +1,17 @@ +--- binutils-2.26.orig/bfd/elf32-i386.c 2016-02-29 15:47:45.172597805 +0000 ++++ binutils-2.26/bfd/elf32-i386.c 2016-02-29 15:48:42.161904973 +0000 +@@ -4016,10 +4016,12 @@ elf_i386_relocate_section (bfd *output_b + + /* It is relative to .got.plt section. */ + if (h->got.offset != (bfd_vma) -1) +- /* Use GOT entry. */ ++ /* Use GOT entry. Mask off the least significant bit in ++ GOT offset which may be set by R_386_GOT32 processing ++ below. */ + relocation = (htab->elf.sgot->output_section->vma + + htab->elf.sgot->output_offset +- + h->got.offset - offplt); ++ + (h->got.offset & ~1) - offplt); + else + /* Use GOTPLT entry. */ + relocation = (h->plt.offset / plt_entry_size - 1 + 3) * 4; |