This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[GOLD] plugin_test failures on PowerPC64 ELFv2
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 2 Jun 2014 09:38:07 +0930
- Subject: [GOLD] plugin_test failures on PowerPC64 ELFv2
- Authentication-results: sourceware.org; auth=none
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