This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] i386: Replace internal_function attribute for __mcount_internal
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 14 Aug 2017 20:39:22 +0200
- Subject: Re: [PATCH] i386: Replace internal_function attribute for __mcount_internal
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AB59651D
- References: <54445c79-cdb6-27a0-5704-d13e8f888f91@redhat.com> <CAMe9rOoo+WKW9igdqK5Lz2Goqgy42JhK=WqcpL5LinSokvnyYg@mail.gmail.com>
On 08/14/2017 07:09 PM, H.J. Lu wrote:
> On Mon, Aug 14, 2017 at 9:34 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> I compiled glibc on i386 with internal_function restored, with a special
>> GCC which encodes the regparm attribute value in the symbol name
>> (similar to what Windows does). This means that mismatches between
>> definition and use result in linker errors.
>>
>> This rediscovered the NSS mismatch already fixed, and another internal
>> mismatch related to mcount. This one is harmless; it's merely an
>> internal inconsistency introduced by the internal_function removal.
>>
>> After adjusting the Versions files to export the mangled names for
>> GLIBC_PRIVATE functions, all libraries link again and the public ABI
>> checks out, so I'm reasonably confident that we now have a consistent
>> build again.
> Is it possible to add a run-time test?
I don't know. I expect a basic _mcount/profiling/gprof test to catch
this. I don't think the calling convention is accidentally compatible.
Some care is needed to avoid linking with system profiling libraries
instead of the freshly build glibc. I don't know how to do that. I
doubt that simply building and linking a test with -pg is sufficient.
Thanks,
Florian