mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-11 13:02:10 +08:00
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.
39 lines
738 B
Makefile
39 lines
738 B
Makefile
#as:
|
|
#source: diag-parlabel.s
|
|
#objdump: --ctf=.ctf
|
|
#ld: -shared --ctf-variables
|
|
#name: Diagnostics - Non-zero parlabel in parent
|
|
|
|
.*: +file format .*
|
|
|
|
Contents of CTF section .ctf:
|
|
|
|
Header:
|
|
Magic number: 0xdff2
|
|
Version: 4 \(CTF_VERSION_3\)
|
|
#...
|
|
Compilation unit name: .*A.c
|
|
Data object section: .* \(0x[1-9a-f][0-9a-f]* bytes\)
|
|
Type section: .* \(0x30 bytes\)
|
|
String section: .*
|
|
|
|
Labels:
|
|
|
|
Data objects:
|
|
a -> 0x[0-9a-f]*: \(kind 6\) struct A \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\)
|
|
#...
|
|
Function objects:
|
|
|
|
Variables:
|
|
|
|
Types:
|
|
#...
|
|
0x[0-9a-f]*: \(kind 6\) struct A \(.*
|
|
*\[0x0\] b: ID 0x[0-9a-f]*: \(kind 3\) struct B \* \(.*
|
|
#...
|
|
Strings:
|
|
0x0:
|
|
#...
|
|
0x[0-9a-f]*: A
|
|
#...
|