This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: IFUNCs used by libc.so.6 internally on x86-64
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, Andreas Schwab <schwab at suse dot de>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 7 Jun 2017 07:50:29 +0200
- Subject: Re: IFUNCs used by libc.so.6 internally on x86-64
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1274AC04B302
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1274AC04B302
- References: <35ad727a-a910-b5a3-0829-905e3bf0abcf@redhat.com> <mvm8tldujwf.fsf@suse.de> <CAMe9rOoUeutn4rQQvgt37LRf3RYsQcDNXXYx61R+wuPKPRR7Sg@mail.gmail.com>
On 06/07/2017 04:11 AM, H.J. Lu wrote:
> On Wed, May 31, 2017 at 8:26 AM, Andreas Schwab <schwab@suse.de> wrote:
>> On Feb 06 2017, Florian Weimer <fweimer@redhat.com> wrote:
>>
>>> The selection of string functions is rather curious. Were these choices
>>> deliberate?
>>
>> They probably just happen, because check-localplt doesn't fail.
>>
>
> I believe all internal calls within libc.so can use IFUNC on x86-64 since
> unlike x86, x86-64 doesn't need to reserve a register to make a PLT call.
> For libc,a, we can't use IFUNC for functions which are called before IFUNC
> has been initialized.
I see IFUNC relocations on i386 as well:
Relocation section [10] '.rel.plt' for section [33] '.got.plt' at offset
0x17678 contains 3 entries:
Offset Type Value Name
0x001d7014 386_IRELATIVE 0000000000
0x001d7010 386_IRELATIVE 0000000000
0x001d700c 386_IRELATIVE 0000000000
Unfortunately, it's really hard to figure out what they are.
Thanks,
Florian