[PATCH] [PR libc/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64

Mike Frysinger vapier@gentoo.org
Wed Aug 12 07:10:00 GMT 2015


On 11 Aug 2015 23:15, Paul Pluzhnikov wrote:
> On Tue, Aug 11, 2015 at 10:48 PM, Mike Frysinger wrote:
> > i don't see why we should make any change.  it isn't ld's problem that the
> > restrictive runtime prevents things.  ld already issues a warning when you
> > have textrels in shared segments, so let's leave it at that.
> 
> For the test case, ld does not issue any warnings:
> 
> gcc -fPIE -pie tst-pie-ifunc-txtrel.S
> readelf -d a.out | grep TEXTREL
>  0x0000000000000016 (TEXTREL)            0x0
> 
> Apparently --warn-shared-textrel is not the default for GNU ld (GNU
> Binutils for Ubuntu) 2.24.

it is in Gentoo ;).  i wouldn't mind that going upstream.

> The resulting binary crashes inside ld.so, for no apparent reason:

i'm ambivalent on the ld.so change.  the quoted context i used before
was just for the ld part, not ld.so.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150812/5560e7f5/attachment.sig>


More information about the Libc-alpha mailing list