[PATCH] Move __mcount_internal from GLIBC_PRIVATE to GLIBC_2.16

Mike Frysinger vapier@gentoo.org
Sat May 19 13:36:00 GMT 2012


On Saturday 19 May 2012 04:26:23 Andreas Schwab wrote:
> Mike Frysinger <vapier@gentoo.org> writes:
> > compiling with -pg only references _mcount
> 
> _mcount is static-only, and references __mcount_internal.

_mcount works fine with dynamic apps, and in that scenario, __mcount_internal 
isn't referenced by apps at all since the _mcount symbol lives in libc.so.  a 
`readelf -s` shows that it isn't even visible.

if you statically link, you pull in the object that contains _mcount which 
references __mcount_internal and pulls in the object that contains that.  but 
still, the final app has no undefined references to __mcount_internal, so i 
don't see any reason the private version of __mcount_internal needs to be 
retained.

we don't maintain the GLIBC_PRIVATE linkage for any symbol because, as the 
namespace implies, we're free to add/remove them over time.  only glibc itself 
gets to use it, and the symbols don't bleed into end user apps.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120519/776a10ed/attachment.sig>


More information about the Libc-alpha mailing list