mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 18:44:20 +08:00
Add --gc-sections test checking removal of __start/__stop symbols.
Well, just __stop__foo but that should be good enough. * testsuite/ld-gc/stop.d, * testsuite/ld-gc/stop.s: New test. * testsuite/ld-gc/gc.exp: Run it.
This commit is contained in:
parent
76cb3a89a6
commit
040b4a9eb8
@ -1,3 +1,9 @@
|
||||
2018-01-30 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* testsuite/ld-gc/stop.d,
|
||||
* testsuite/ld-gc/stop.s: New test.
|
||||
* testsuite/ld-gc/gc.exp: Run it.
|
||||
|
||||
2018-01-30 Maciej W. Rozycki <macro@mips.com>
|
||||
|
||||
PR ld/22649
|
||||
|
@ -104,6 +104,7 @@ test_gc "Check --gc-section/-r/-u" "gcrel" $ld "-r --gc-sections -u used_func"
|
||||
run_dump_test "noent"
|
||||
run_dump_test "abi-note"
|
||||
run_dump_test "start"
|
||||
run_dump_test "stop"
|
||||
run_dump_test "pr19167"
|
||||
if { [is_elf_format] } then {
|
||||
run_dump_test "all-debug-sections"
|
||||
|
10
ld/testsuite/ld-gc/stop.d
Normal file
10
ld/testsuite/ld-gc/stop.d
Normal file
@ -0,0 +1,10 @@
|
||||
#name: --gc-sections removing __stop_
|
||||
#ld: --gc-sections -e _start
|
||||
#nm: -n
|
||||
#target: *-*-linux* *-*-gnu*
|
||||
#notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux*
|
||||
|
||||
#failif
|
||||
#...
|
||||
[0-9a-f]+ D +__stop__foo
|
||||
#...
|
8
ld/testsuite/ld-gc/stop.s
Normal file
8
ld/testsuite/ld-gc/stop.s
Normal file
@ -0,0 +1,8 @@
|
||||
.text
|
||||
.globl _start
|
||||
_start:
|
||||
.dc.a 0
|
||||
|
||||
.section _foo,"aw",%progbits
|
||||
foo:
|
||||
.long 1
|
Loading…
Reference in New Issue
Block a user