From: Adhemerval Zanella Date: Wed, 19 Mar 2014 20:30:18 +0000 (-0500) Subject: Fix localplt check for GNU_IFUNC X-Git-Tag: glibc-2.20~687 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bc5a74162d044cc227b38ebf24e2d1d4594ecb8;p=thirdparty%2Fglibc.git Fix localplt check for GNU_IFUNC GNU_IFUNC are shown by readelf in 'Relocation section' value as "symbol()" instead of expected hexadecimal value. This causes the check-localplt script to ignore potential PLT stub begin generated by wrong IFUNC usage. This patch changes the localplt script to emit such PLT cases. --- diff --git a/ChangeLog b/ChangeLog index e828cc28a57..a4aab107c0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-03-25 Adhemerval Zanella + + * scripts/localplt.awk: Check for PLT generated by internal IFUNC + calls. + 2014-03-25 Adhemerval Zanella * nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Revert diff --git a/scripts/localplt.awk b/scripts/localplt.awk index 2265b026f07..f55c41a0373 100644 --- a/scripts/localplt.awk +++ b/scripts/localplt.awk @@ -32,9 +32,15 @@ $1 == "Offset" && $2 == "Info" { in_relocs = 1; next } NF == 0 { in_relocs = 0 } in_relocs && relocs_offset == jmprel_offset && NF >= 5 { - symval = strtonum("0x" $4); - if (symval != 0) + # Relocations against GNU_IFUNC symbols are not shown as an hexadecimal + # value, but rather as the resolver symbol followed by (). + if ($4 ~ /\(\)/) { print whatfile, $5 + } else { + symval = strtonum("0x" $4); + if (symval != 0) + print whatfile, $5 + } } in_relocs { next }