]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix gold plugin_test failures on PowerPC64 ELFv2
authorAlan Modra <amodra@gmail.com>
Tue, 3 Jun 2014 01:17:55 +0000 (10:47 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 12 Jun 2014 15:29:05 +0000 (00:59 +0930)
readelf output for ELFv2 includes st_other bits specifying a
function's local entry offset.

* testsuite/plugin_test.c (parse_readelf_line): Skip non-visibility
st_other output.

gold/ChangeLog
gold/testsuite/plugin_test.c

index 68eec29f0b0a2e293e5bb91479e17e3d0cf16818..56450443f7c8653546f537661e031f5b1686605a 100644 (file)
@@ -1,6 +1,10 @@
 2014-06-12  Alan Modra  <amodra@gmail.com>
 
        Backport mainline patches
+       2014-06-03  Alan Modra  <amodra@gmail.com>
+       * testsuite/plugin_test.c (parse_readelf_line): Skip non-visibility
+       st_other output.
+
        2014-06-02  Alan Modra  <amodra@gmail.com>
        * powerpc.cc (Target_powerpc::local_reloc_may_be_function_pointer):
        Only ignore relocs on ELFv1.
index 47d400a0b311e7e632385c2a1976abcc8c933f37..2f91dc0d7c31be677222b57800922c845e69acdd 100644 (file)
@@ -584,6 +584,13 @@ parse_readelf_line(char* p, struct sym_info* info)
   p += strcspn(p, " ");
   p += strspn(p, " ");
 
+  if (*p == '[')
+    {
+      /* Skip st_other.  */
+      p += strcspn(p, "]");
+      p += strspn(p, "] ");
+    }
+
   /* Section field.  */
   info->sect = p;
   p += strcspn(p, " ");