mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-24 12:35:55 +08:00
c98de297b3
GCC 11+ spots that the extern var_1 and var_666 declarations in this test are unused, and removes them, thus stopping them from appearing as conflicted data symbols and rendering the test pointless. Use them in a function unique to this TU to prevent them from being eliminated. ld/ChangeLog 2021-01-19 Nick Alcock <nick.alcock@oracle.com> * testsuite/ld-ctf/data-func-2.c: Stop removal of the extern foo_t symbols by the optimizer. * testsuite/ld-ctf/data-func-conflicted.d: Adjust accordingly.
65 lines
2.2 KiB
Makefile
65 lines
2.2 KiB
Makefile
#as:
|
|
#source: data-func-1.c
|
|
#source: data-func-2.c
|
|
#objdump: --ctf=.ctf
|
|
#ld: -shared -s
|
|
#name: Conflicted data syms, partially indexed, stripped
|
|
|
|
.*: +file format .*
|
|
|
|
Contents of CTF section \.ctf:
|
|
|
|
Header:
|
|
Magic number: 0xdff2
|
|
Version: 4 \(CTF_VERSION_3\)
|
|
#...
|
|
Data object section: .* \(0xc bytes\)
|
|
Function info section: .* \(0x44 bytes\)
|
|
Object index section: .* \(0xc bytes\)
|
|
Type section: .* \(0xf4 bytes\)
|
|
String section: .*
|
|
#...
|
|
Data objects:
|
|
bar -> 0x[0-9a-f]*: \(kind 6\) struct var_3 \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\)
|
|
var_1 -> 0x[0-9a-f]*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
var_666 -> 0x[0-9a-f]*: \(kind 3\) foo_t \* \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
|
|
Function objects:
|
|
func_[0-9]* -> 0x[0-9a-f]*: \(kind 5\) void \*\(\*\) \(const char \*restrict, int \(\*\)\(\*\) \(const char \*\)\) \(aligned at 0x[0-9a-f]*\)
|
|
#...
|
|
Types:
|
|
#...
|
|
.*: \(kind 6\) struct var_3 .*
|
|
#...
|
|
CTF archive member: .*/data-func-1\.c:
|
|
|
|
Header:
|
|
Magic number: 0xdff2
|
|
Version: 4 \(CTF_VERSION_3\)
|
|
#...
|
|
Parent name: \.ctf
|
|
Compilation unit name: .*/data-func-1\.c
|
|
Data object section: .* \(0xfa4 bytes\)
|
|
Type section: .* \(0xc bytes\)
|
|
String section: .*
|
|
|
|
Labels:
|
|
|
|
Data objects:
|
|
var_[0-9]* -> 0x80000001*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
var_[0-9]* -> 0x80000001*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
var_[0-9]* -> 0x80000001*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
var_[0-9]* -> 0x80000001*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
var_[0-9]* -> 0x80000001*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
var_[0-9]* -> 0x80000001*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
var_[0-9]* -> 0x80000001*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
var_[0-9]* -> 0x80000001*: \(kind 10\) foo_t \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\) -> .*
|
|
#...
|
|
Function objects:
|
|
|
|
Variables:
|
|
|
|
Types:
|
|
0x80000001: \(kind 10\) foo_t .* -> .* int .*
|
|
#...
|