diff mbox

Fix localplt test breakage with new readelf

Message ID 20150226133649.GL16384@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra Feb. 26, 2015, 1:36 p.m. UTC
Since 2014-11-24 git commit bb4d2ac2, readelf has appended the symbol
version to symbols shown in reloc dumps.

	* scripts/localplt.awk: Strip off symbol version.

Comments

H.J. Lu Feb. 26, 2015, 2:34 p.m. UTC | #1
On Thu, Feb 26, 2015 at 5:36 AM, Alan Modra <amodra@gmail.com> wrote:
> Since 2014-11-24 git commit bb4d2ac2, readelf has appended the symbol
> version to symbols shown in reloc dumps.
>
>         * scripts/localplt.awk: Strip off symbol version.

This fixes:

https://sourceware.org/bugzilla/show_bug.cgi?id=16512

Please add PR to ChangeLog entry and update NEWS.

Thanks.
Stefan Liebler March 2, 2015, 3:24 p.m. UTC | #2
Hi,

the check-localplt testcase is now passing on s390.
Please commit.

Bye
Stefan

On 02/26/2015 02:36 PM, Alan Modra wrote:
> Since 2014-11-24 git commit bb4d2ac2, readelf has appended the symbol
> version to symbols shown in reloc dumps.
>
> 	* scripts/localplt.awk: Strip off symbol version.
>
> diff --git a/scripts/localplt.awk b/scripts/localplt.awk
> index f55c41a..84c94d1 100644
> --- a/scripts/localplt.awk
> +++ b/scripts/localplt.awk
> @@ -35,11 +35,11 @@ in_relocs && relocs_offset == jmprel_offset && NF >= 5 {
>     # 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
> +    print whatfile, gensub(/@.*/, "", "g", $5)
>     } else {
>       symval = strtonum("0x" $4);
>       if (symval != 0)
> -      print whatfile, $5
> +      print whatfile, gensub(/@.*/, "", "g", $5)
>     }
>   }
>
>
diff mbox

Patch

diff --git a/scripts/localplt.awk b/scripts/localplt.awk
index f55c41a..84c94d1 100644
--- a/scripts/localplt.awk
+++ b/scripts/localplt.awk
@@ -35,11 +35,11 @@  in_relocs && relocs_offset == jmprel_offset && NF >= 5 {
   # 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
+    print whatfile, gensub(/@.*/, "", "g", $5)
   } else {
     symval = strtonum("0x" $4);
     if (symval != 0)
-      print whatfile, $5
+      print whatfile, gensub(/@.*/, "", "g", $5)
   }
 }