From 9cf251f2e704e74ce372dbcad18598053bd1a60e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 3 Jun 2014 10:47:55 +0930 Subject: [PATCH] Fix gold plugin_test failures on PowerPC64 ELFv2 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 | 4 ++++ gold/testsuite/plugin_test.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/gold/ChangeLog b/gold/ChangeLog index 68eec29f0b0..56450443f7c 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,6 +1,10 @@ 2014-06-12 Alan Modra Backport mainline patches + 2014-06-03 Alan Modra + * testsuite/plugin_test.c (parse_readelf_line): Skip non-visibility + st_other output. + 2014-06-02 Alan Modra * powerpc.cc (Target_powerpc::local_reloc_may_be_function_pointer): Only ignore relocs on ELFv1. diff --git a/gold/testsuite/plugin_test.c b/gold/testsuite/plugin_test.c index 47d400a0b31..2f91dc0d7c3 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, " "); -- 2.47.2