[PATCH] Nuke another 21 .plt slots

Roland McGrath roland@frob.com
Mon Aug 5 15:11:00 GMT 2002


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'

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



More information about the Libc-hacker mailing list