This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed, PATCH] PR ld/20244: Subtract GOT base only with a base register
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Tue, 14 Jun 2016 16:03:36 -0700
- Subject: Re: [committed, PATCH] PR ld/20244: Subtract GOT base only with a base register
- Authentication-results: sourceware.org; auth=none
- References: <20160612042508 dot GA7482 at gmail dot com> <CAMe9rOoT3Zf7+6j6UVQ3VTtA4H9LL3TKFo0-VhAi8iUxBzrYpg at mail dot gmail dot com>
On Mon, Jun 13, 2016 at 11:13 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> 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.
>
I backported it to 2.26.
--
H.J.