[PATCH, libstdc++]: Fix scripts/extract_symvers to remove extra [<other>: xx] field

Uros Bizjak ubizjak@gmail.com
Mon Jan 12 08:08:00 GMT 2009


Hello!

On alphaev56-unknown-linux-gnu "readelf --symbols" returns extra field
that breaks table format, i.e.:

  1178: 00000000000cf500   184 FUNC    WEAK   DEFAULT [<other>: 88]
10 _ZSt9has_facetISt11__time@@GLIBCXX_3.4

This extra field confuses extract_symvers scripts to produce garbage
when FUNC is processed.

>From readelf source:

--cut here--
	      /* Check to see if any other bits in the st_other field are set.
	         Note - displaying this information disrupts the layout of the
	         table being generated, but for the moment this case is very rare.  */
	      if (psym->st_other ^ ELF_ST_VISIBILITY (psym->st_other))
		printf (" [%s] ", get_symbol_other (psym->st_other ^
ELF_ST_VISIBILITY (psym->st_other)));

...
static const char *
get_symbol_other (unsigned int other)
{
...
  snprintf (buff, sizeof buff, _("<other>: %x"), other);
  return buff;
}
--cut here--

Apparently and contrary to the comment, this case is not very rare.

Attached patch adds another sed script to existing sed command that
removes this extra field.

However, this is not enough to fully fix abi_check failure. Remaining
errors are due to various numeric_limits functions with __float128
argument:

_ZNSt14numeric_limitsIgE14max_exponent10E
std::numeric_limits<__float128>::max_exponent10
version status: incompatible
GLIBCXX_3.4
type: object
type size: 4
status: added

The problem here is the same as for powerpc - __float128 functions
should have been versioned to GLIBCXX_LDBL_3.4 version. Switching
commented-out lines in config/abi/pre/gnu.ver:

    # std::numeric_limits
    # _ZNSt14numeric_limitsI[^g]*;
    _ZNSt14numeric_limitsI[a-z]E*;

Fixes these abi failures.

2009-01-12  Uros Bizjak  <ubizjak@gmail.com>

	* scripts/extract_symvers: Add sed script to remove ' [<other>: xx] '
	field from readelf output.

Patch was tested on alphaev56-unknown-linux-gnu and
x86_64-pc-linux-gnu. OK for 4.3 and 4.4 ?

Uros.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: l.diff.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20090112/0ed1bd95/attachment.txt>


More information about the Libstdc++ mailing list