FAIL: Build pr22983 (both x86-64 and aarch64, Gentoo)
Nick Clifton
nickc@redhat.com
Mon Jun 11 12:07:00 GMT 2018
Hi Andreas,
> Symbol table '.dynsym' contains 11 entries:
> Num: Value Size Type Bind Vis Ndx Name
> 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
> 1: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable
> 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.2.5 (2)
> 3: 0000000000000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
> 4: 00000000000007b0 4 FUNC GLOBAL DEFAULT 13 func_attr_used_disabled
> 5: 0000000000201030 4 OBJECT GLOBAL DEFAULT 23 var_attr_used_enabled
> 6: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (3)
> 7: 00000000000007a0 4 FUNC GLOBAL DEFAULT 13 func_attr_used_enabled
> 8: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable
> 9: 0000000000201034 4 OBJECT GLOBAL DEFAULT 23 var_attr_used_disabled
> 10: 0000000000000000 0 FUNC WEAK DEFAULT UND __cxa_finalize@GLIBC_2.2.5 (2)
> do I interpret this correctly that the test fails because of the additional lines
> in between / the non-sorting of the table? (And if yes, is that relevant?)
Not the additional lines, those should be ignored. But you are spot on with the
non-sorting of the table. This is indeed the cause of the problem. The test script
is expecting to see the symbols in this order:
var_attr_used_enabled
var_attr_used_disabled first
func_attr_used_enabled
func_attr_used_disabled
This is the same order as the symbols are specified in the pr22983.t file.
That file is part of the --dynamic-list command line option that is used when
the test invokes the linker, and I guess most targets preserve the symbol
ordering in their output. There is no documentation stating that the order
has to be preserved however, so the test is incorrect.
Fixing the test is going to be hard however. It is important to make sure
that all four symbols are in the dynamic symbol table, so just shortening the
pattern match rules in pr22983.d will not work. The readelf program that is
used to dump the dynamic symbol table does not have a sorting option, and the
linker testsuite harness does not have a way of invoking an external sorting
program on the output, so the ordering cannot be guaranteed.
So ... please could you try out the attached patch, which uses a rather
hackish method to work around the problem - it runs the check four times,
once for each symbol, each time ignoring any other symbol. I think that
should work for you, but I would like to be sure.
Cheers
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr22983.patch
Type: text/x-patch
Size: 2900 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180611/5c1683e5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20180611/5c1683e5/attachment.sig>
More information about the Binutils
mailing list