about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-03-19 15:30:18 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2014-03-25 14:15:35 -0500
commit7bc5a74162d044cc227b38ebf24e2d1d4594ecb8 (patch)
tree57c5dbe6760ec43133b9ef7dcb6d24251c5e5412 /scripts
parent7578473bbeb61a1d3808104b551f9d0b12e42670 (diff)
downloadglibc-7bc5a74162d044cc227b38ebf24e2d1d4594ecb8.tar.gz
glibc-7bc5a74162d044cc227b38ebf24e2d1d4594ecb8.tar.xz
glibc-7bc5a74162d044cc227b38ebf24e2d1d4594ecb8.zip
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/localplt.awk10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/localplt.awk b/scripts/localplt.awk
index 2265b026f0..f55c41a037 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 }