This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: new ppc32 GOT/PLT support for mcount
- From: Jakub Jelinek <jakub at redhat dot com>
- To: sjmunroe at vnet dot ibm dot com
- Cc: libc-alpha at sources dot redhat dot com, Alan Modra <amodra at bigpond dot net dot au>
- Date: Sat, 11 Jun 2005 10:58:52 +0200
- Subject: Re: new ppc32 GOT/PLT support for mcount
- References: <42A8C35C.1050209@us.ibm.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 09, 2005 at 05:31:56PM -0500, Steve Munroe wrote:
> One possibility is to move a version of the ppc-mcount.S stub code into
> libc_nonshared and have it establish the got (using the new ABI) before
> calling __mcount_internal via the new PLT.
>
> For compatibility we need to version _mcount. The old version in
> ppc-mcount.S will be export _mcount@GLIBC_2.0. The new version
> (ppc2-mcount.S) will export the default version _mcount@@GLIBC_2.4. The
> new version will included in libc_nonshared.a so it can be called @local
> from -pg prologues. The implementation of __mcount_internal
> (gmon/mcount.c) will remain unchanged except for
> making__mcount_internal@@GLIBC_PRIVATE.
This looks wrong, for multiple reasons:
1) if the arguments to _mcount are different between -mno-secure-plt
and -msecure-plt, then -msecure-plt _mcount shouldn't be called _mcount,
but something else. Otherwise you preclude building -mno-secure-plt
profiled stuff on glibc's with your patch
2) symbols that are in libc_nonshared.a are not versioned
3) if libc_nonshared.a uses some symbol from libc.so (as in this case
__mcount_internal), that symbol must not be GLIBC_PRIVATE. As
libc_nonshared.a is linked into user programs/libraries, any interface
between libc_nonshared.a and libc.so is necessarily public.
Jakub