PR ld/20828: Remove leading `_' from symbols used in tests
Complement commit81ff47b3a5
("PR ld/20828: Fix linker script symbols wrongly forced local with section GC") and remove the leading underscore from `_fdata' and `_edata' symbols used in tests, fixing a: FAIL: PR ld/20828 dynamic symbols with section GC (version script) failure with targets such as: `bfin-elf', `bfin-uclinux', `metag-elf', `metag-linux' `mn10300-elf', `sh-elf', `sh64-elf', and possibly other ones, that have `_' set (with `elf_symbol_leading_char') as the leading character for symbols. As from commit93252b1cf4
("bfd/ld: handle ABI prefixes in version scripts") these targets strip the leading underscore before applying version script rules, because the (default) syntax for symbol names is that of the C language rather than their low-level symbol table encoding. ld/ PR ld/20828 * testsuite/ld-elf/pr20828.ld: Rename `_fdata' and `_edata' to `fdata' and `edata' respectively. * testsuite/ld-elf/pr20828.ver: Adjust accordingly. * testsuite/ld-elf/pr20828-a.sd: Likewise. * testsuite/ld-elf/pr20828-b.sd: Likewise. * testsuite/ld-elf/pr20828-c.sd: Likewise.
This commit is contained in:
parent
adcbdc63e5
commit
fda46c417f
10
ld/ChangeLog
10
ld/ChangeLog
@ -1,3 +1,13 @@
|
||||
2017-01-23 Maciej W. Rozycki <macro@imgtec.com>
|
||||
|
||||
PR ld/20828
|
||||
* testsuite/ld-elf/pr20828.ld: Rename `_fdata' and `_edata' to
|
||||
`fdata' and `edata' respectively.
|
||||
* testsuite/ld-elf/pr20828.ver: Adjust accordingly.
|
||||
* testsuite/ld-elf/pr20828-a.sd: Likewise.
|
||||
* testsuite/ld-elf/pr20828-b.sd: Likewise.
|
||||
* testsuite/ld-elf/pr20828-c.sd: Likewise.
|
||||
|
||||
2017-01-23 Maciej W. Rozycki <macro@imgtec.com>
|
||||
|
||||
PR ld/20828
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Make sure `_fdata' is global rather than local in the dynamic symbol table,
|
||||
# Make sure `fdata' is global rather than local in the dynamic symbol table,
|
||||
# e.g.:
|
||||
# Num: Value Size Type Bind Vis Ndx Name
|
||||
# 1: 00000000 0 NOTYPE GLOBAL DEFAULT 1 _fdata
|
||||
# 1: 00000000 0 NOTYPE GLOBAL DEFAULT 1 fdata
|
||||
# vs:
|
||||
# 1: 00000000 0 NOTYPE LOCAL DEFAULT 1 _fdata
|
||||
# 1: 00000000 0 NOTYPE LOCAL DEFAULT 1 fdata
|
||||
#...
|
||||
*[0-9]+: +[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +_fdata
|
||||
*[0-9]+: +[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +fdata
|
||||
#pass
|
||||
|
@ -1,9 +1,9 @@
|
||||
# Make sure `_edata' is global rather than local in the dynamic symbol table,
|
||||
# Make sure `edata' is global rather than local in the dynamic symbol table,
|
||||
# e.g.:
|
||||
# Num: Value Size Type Bind Vis Ndx Name
|
||||
# 1: 00000000 0 NOTYPE GLOBAL DEFAULT 1 _edata
|
||||
# 1: 00000000 0 NOTYPE GLOBAL DEFAULT 1 edata
|
||||
# vs:
|
||||
# 1: 00000000 0 NOTYPE LOCAL DEFAULT 1 _edata
|
||||
# 1: 00000000 0 NOTYPE LOCAL DEFAULT 1 edata
|
||||
#...
|
||||
*[0-9]+: +[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +_edata
|
||||
*[0-9]+: +[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +[0-9]+ +edata
|
||||
#pass
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Make sure no `_fdata' is present in the dynamic symbol table, e.g.:
|
||||
# Make sure no `fdata' is present in the dynamic symbol table, e.g.:
|
||||
# Num: Value Size Type Bind Vis Ndx Name
|
||||
# 1: 00000000 0 NOTYPE LOCAL DEFAULT 1 _fdata
|
||||
# 1: 00000000 0 NOTYPE LOCAL DEFAULT 1 fdata
|
||||
#failif
|
||||
#...
|
||||
.+ +_fdata
|
||||
.+ +fdata
|
||||
#pass
|
||||
|
@ -2,9 +2,9 @@ SECTIONS
|
||||
{
|
||||
.data :
|
||||
{
|
||||
_fdata = .;
|
||||
fdata = .;
|
||||
*(.data)
|
||||
_edata = .;
|
||||
edata = .;
|
||||
}
|
||||
.dynamic : { *(.dynamic) }
|
||||
.hash : { *(.hash) }
|
||||
|
@ -1 +1 @@
|
||||
{ global: _edata; local: *; };
|
||||
{ global: edata; local: *; };
|
||||
|
Loading…
Reference in New Issue
Block a user