ld: do not rely on the exact size of the CTF symtypetabs in test results
The data object and function info sections (collectively "symtypetabs")
usually (i.e. if non-indexed) have sizes defined by the size of the ELF
dynamic symbol table in the object they are linked to. This means test
results should not depend on the exact sizes of these sections, because
adding entirely irrelevant symbols to the dynsym can cause spurious test
failures. (This also means we should not match the offset of sections
that follow them, since those too depend on the exact size of the
symtypetab sections.)
Spotted by turning the sanitizer on, which introduced new dynsym entries
and expanded the symtypetab sizes to match.
ld/ChangeLog
2021-03-25 Nick Alcock <nick.alcock@oracle.com>
* testsuite/ld-ctf/array.d: Only check that the data object
section is nonempty: do not check its exact size.
* testsuite/ld-ctf/diag-parlabel.d: Likewise.
* testsuite/ld-ctf/slice.d: Likewise.
* testsuite/ld-ctf/data-func-conflicted.d: Likewise, and for the
func info section too.
* testsuite/ld-ctf/function.d: Likewise, for the func info section.