[PATCH] [BZ #18078] FAIL: elf/check-localplt with ld from binutils 2.26
H.J. Lu
hjl.tools@gmail.com
Wed Mar 11 17:02:00 GMT 2015
On Tue, Mar 10, 2015 at 3:21 PM, Roland McGrath <roland@hack.frob.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?
--
H.J.
---
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
sections.
* 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Extend-local-PLT-reference-check.patch
Type: text/x-patch
Size: 7061 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150311/ea9f4e04/attachment.bin>
More information about the Libc-alpha
mailing list