This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] [BZ #18078] FAIL: elf/check-localplt with ld from binutils 2.26
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 14 Jul 2015 12:43:28 -0700
- Subject: Re: [PATCH] [BZ #18078] FAIL: elf/check-localplt with ld from binutils 2.26
- Authentication-results: sourceware.org; auth=none
- References: <20150309202636 dot GA24131 at intel dot com> <20150310222117 dot EDBC82C3C15 at topped-with-meat dot com> <CAMe9rOrNWwPX3sFE1Ymbf94wsM4BL9tq2EQ8HFnd=uqfwisjew at mail dot gmail dot com>
On Wed, Mar 11, 2015 at 10:02 AM, H.J. Lu <firstname.lastname@example.org> wrote:
> On Tue, Mar 10, 2015 at 3:21 PM, Roland McGrath <email@example.com> wrote:
>> I don't think this is the way to do it. For those cases it is mandatory
>> that libc is actually using the PLT entry, so we don't want a check that
>> would pass if libc stopped using it at all. Perhaps instead there is a way
>> to modify scripts/localplt.awk and/or scripts/check-localplt.awk so that
>> they will grok the new linker's output as constituting use of a PLT entry.
>> Maybe a GLOB_DAT reloc to a symbol that's STT_FUNC is a close enough proxy?
> Here is the patch to extend local PLT reference check to support
> alternate relocations. OK for master?
> On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with
> R_*_GLOB_DAT relocation against the same symbol. This patch extends
> local PLT reference check to support alternate relocations.
> [BZ #18078]
> * scripts/check-localplt.awk: Support alternate relocations.
> * scripts/localplt.awk: Also check relocations in DT_RELA/DT_REL
> * sysdeps/unix/sysv/linux/i386/localplt.data: Mark free and
> malloc entries with + REL R_386_GLOB_DAT.
> * sysdeps/x86_64/localplt.data: New file.