[GOLD] plugin_test failures on PowerPC64 ELFv2
Alan Modra
amodra@gmail.com
Mon Jun 2 00:08:00 GMT 2014
readelf output for ELFv2 includes st_other bits specifying a
function's local entry offset. For example:
10: 0000000000000020 116 FUNC GLOBAL DEFAULT [<localentry>: 8] 1 foo
When your readelf doesn't support powerpc64le, you get the raw bits:
10: 0000000000000020 116 FUNC GLOBAL DEFAULT [<other>: 60] 1 foo
The extra output results in testsuite failures. Fixed as follows.
OK to apply?
* testsuite/plugin_test.c (parse_readelf_line): Skip non-visibility
st_other output.
diff --git a/gold/testsuite/plugin_test.c b/gold/testsuite/plugin_test.c
index 68f9d99..79ae44e 100644
--- a/gold/testsuite/plugin_test.c
+++ b/gold/testsuite/plugin_test.c
@@ -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, " ");
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list