This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Nuke another 21 .plt slots


On Mon, Aug 05, 2002 at 06:11:55PM -0400, Roland McGrath wrote:
> Thanks!  I put those in.  However, my PLT count does not match yours.  I
> get 169 in a build with TLS support, and I think that is only one more than
> without TLS.
> 
> I have been counting using this script (it gives a list of symbols; pipe it
> to wc -l), which counts only PLT slots for symbols defined in libc itself,
> and omits the malloc functions that are explicit exceptions.  That count is
> now 121.
> 
> #!/bin/sh
> 
> goodones='__libc_free
> __libc_malloc
> __libc_memalign
> __libc_realloc
> free
> calloc
> malloc
> realloc'

This list is too short, e.g. __fork and some others which are to
be overridden by libpthread.so should be in the list too.

> readelf -rW libc.so | awk '/JUMP_SLOT/ && $4 != "00000000" { print $5 }' |
> fgrep -vx "$goodones" | sort

I believe the difference can be that my build was with -O3, so a bunch
of calls were inlined and thus not going externally.
I'll try an -O2 build tomorrow.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]