[committed, PATCH] PR ld/20244: Subtract GOT base only with a base register
H.J. Lu
hjl.tools@gmail.com
Mon Jun 13 18:13:00 GMT 2016
On Sat, Jun 11, 2016 at 9:25 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> When relocating R_386_GOT32 in "op $0, bar@GOT", we shouldn't subtract
> GOT base without a base register and we should disallow it without a
> base register for PIC.
>
> bfd/
>
> PR ld/20244
> * elf32-i386.c (elf_i386_relocate_section): When relocating
> R_386_GOT32, return error without a base register for PIC and
> subtract the .got.plt section address only with a base register.
>
> ld/
>
> PR ld/20244
> * testsuite/ld-i386/i386.exp: Run pr20244-1a and pr20244-1b.
> * testsuite/ld-i386/pr20244-1.s: New file.
> * testsuite/ld-i386/pr20244-1a.d: Likewise.
> * testsuite/ld-i386/pr20244-1b.d: Likewise.
> * testsuite/ld-i386/pr20244-1c.d: Likewise.
I checked in this patch for R_386_GOT32/R_386_GOT32X relocations
against IFUNC symbols without base register.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-the-GOT-base-for-GOT32-relocs-against-IFUNC.patch
Type: text/x-patch
Size: 12948 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20160613/b8da6207/attachment.bin>
More information about the Binutils
mailing list