diff options
Diffstat (limited to 'ld/testsuite/ld-gc')
-rw-r--r-- | ld/testsuite/ld-gc/gc.exp | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr19161.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr20022.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr20022a.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/pr20022b.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-gc/start.d | 2 |
6 files changed, 35 insertions, 2 deletions
diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp index ba5c46b..364c73b 100644 --- a/ld/testsuite/ld-gc/gc.exp +++ b/ld/testsuite/ld-gc/gc.exp @@ -119,6 +119,12 @@ if { [is_elf_format] && [check_shared_lib_support] } then { run_dump_test "personality" } run_dump_test "pr18223" + if {![ld_assemble_flags $as $gasopt $srcdir/$subdir/pr20022a.s tmpdir/pr20022a.o] + || ![ld_link $ld tmpdir/pr20022.so "-shared --gc-sections tmpdir/pr20022a.o"] } then { + fail pr20022 + } else { + run_dump_test "pr20022" + } } if { [is_remote host] || [which $CC] != 0 } { diff --git a/ld/testsuite/ld-gc/pr19161.d b/ld/testsuite/ld-gc/pr19161.d index c36e663..baee8da 100644 --- a/ld/testsuite/ld-gc/pr19161.d +++ b/ld/testsuite/ld-gc/pr19161.d @@ -6,5 +6,5 @@ #xfail: mips64vr-*-* msp430-*-* powerpc*-*-eabivle rl78-*-* rx-*-* sh*-*-* #... -0*[1-9a-f]+[0-9a-f]*[ ](D)[ ]_*__start_my_section +0*[1-9a-f]+[0-9a-f]*[ ](d|D)[ ]_*__start_my_section #... diff --git a/ld/testsuite/ld-gc/pr20022.d b/ld/testsuite/ld-gc/pr20022.d new file mode 100644 index 0000000..b51ec19 --- /dev/null +++ b/ld/testsuite/ld-gc/pr20022.d @@ -0,0 +1,11 @@ +#source: pr20022b.s +#ld: --gc-sections -e _start tmpdir/pr20022.so +#readelf: -SsW +#target: *-*-linux* *-*-gnu* +#notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux* + +#... + \[[ 0-9]+\] _foo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+[ \t]+.* +#... + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +NOTYPE +LOCAL +DEFAULT +[0-9]+ +__start__foo +#pass diff --git a/ld/testsuite/ld-gc/pr20022a.s b/ld/testsuite/ld-gc/pr20022a.s new file mode 100644 index 0000000..6bd346f --- /dev/null +++ b/ld/testsuite/ld-gc/pr20022a.s @@ -0,0 +1,8 @@ + .data + .globl bar + .type bar,%object +bar: + .dc.a __start__foo + .section _foo,"aw",%progbits +foo: + .ascii "This is bar" diff --git a/ld/testsuite/ld-gc/pr20022b.s b/ld/testsuite/ld-gc/pr20022b.s new file mode 100644 index 0000000..2306c59 --- /dev/null +++ b/ld/testsuite/ld-gc/pr20022b.s @@ -0,0 +1,8 @@ + .text + .globl _start +_start: + .dc.a __start__foo + .dc.a bar + .section _foo,"aw",%progbits +foo: + .ascii "This is foo" diff --git a/ld/testsuite/ld-gc/start.d b/ld/testsuite/ld-gc/start.d index 18e74c1..9113b48 100644 --- a/ld/testsuite/ld-gc/start.d +++ b/ld/testsuite/ld-gc/start.d @@ -5,5 +5,5 @@ #notarget: *-*-*aout *-*-*oldld frv-*-linux* metag-*-linux* #... -[0-9a-f]+ D +__start__foo +[0-9a-f]+ d +__start__foo #... |