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>
Tue, 3 Jun 2014 01:17:55 +0000 (10:47 +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 b421ad9008c23725745ce91fcdf2d6dd96e25ff4..0bde6a1cd0ad506f990d37430f4fdd27b78453b5 100644 (file)
@@ -1,3 +1,8 @@
+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):
index 68f9d99f9bdbf35606276dd8cd960281a9bd9087..79ae44e13ac3c7604ceee8e89ca538c4441b013e 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, " ");