This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Ignore elfdump warnings in scripts/extract_symvers.pl
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>, Richard Biener <rguenther at suse dot de>
- Date: Tue, 14 Apr 2015 14:59:06 +0200
- Subject: [v3] Ignore elfdump warnings in scripts/extract_symvers.pl
- Authentication-results: sourceware.org; auth=none
The libstdc++-v3 abi_check test is FAILing on Solaris 11 with gld. It
turns out this happens because a elfdump warning (printed to stderr) is
mixed with regular elfdump output. In the case at hand, elfdump warns
.gnu.version_r: zero sh_entsize information, expected 0x1
.gnu.version_d: zero sh_entsize information, expected 0x1
but obviously trying to parse warnings as regular output is doomed to
fail. While it has been determined that those concrete warnings are
bogus and will be removed in the future, the general problem remains.
The following patch fixes this by just ignoring elfdump error output.
Bootstrapped without regressions on i386-pc-solaris2.1[01] and
sparc-sun-solaris2.1[01] (with as/ld, gas/gld) on both mainline and
gcc-5 branch. Ok for mainline and gcc-5 branch? I suppose the patch is
safe enough even at this point since it only affects a solaris specific
file.
Rainer
2015-04-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* scripts/extract_symvers.pl: Ignore elfdump error output.
# HG changeset patch
# Parent 8093370756d009b628285d00fd7c4513d91fea92
Ignore elfdump warnings in scripts/extract_symvers.pl
diff --git a/libstdc++-v3/scripts/extract_symvers.pl b/libstdc++-v3/scripts/extract_symvers.pl
--- a/libstdc++-v3/scripts/extract_symvers.pl
+++ b/libstdc++-v3/scripts/extract_symvers.pl
@@ -82,7 +82,10 @@ while (<PVS>) {
close PVS or die "pvs error";
# Only look at .dynsym table, like readelf in extract_symvers.
-open ELFDUMP, "/usr/ccs/bin/elfdump -s -N .dynsym $lib |" or die $!;
+# Ignore error output to avoid getting confused by
+# .gnu.version_r: zero sh_entsize information, expected 0x1
+# warning with Solaris 11 elfdump on gld-produced shared objects.
+open ELFDUMP, "/usr/ccs/bin/elfdump -s -N .dynsym $lib 2>/dev/null |" or die $!;
while (<ELFDUMP>) {
chomp;
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University