1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

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.
This commit is contained in:
Adhemerval Zanella
2014-03-19 15:30:18 -05:00
parent 7578473bbe
commit 7bc5a74162
2 changed files with 13 additions and 2 deletions

View File

@ -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 }