PowerPC undefweak testcase

Test for commit 4916030821 and b293661219.

	* testsuite/ld-powerpc/empty.s: New file.
	* testsuite/ld-powerpc/undefweak.d,
	* testsuite/ld-powerpc/undefweak.s: New testcase.
	* testsuite/ld-powerpc/powerpc.exp: Run it.
This commit is contained in:
Alan Modra 2021-05-05 10:35:31 +09:30
parent 3897046fe0
commit 13ffdac36f
5 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2021-05-05 Alan Modra <amodra@gmail.com>
* testsuite/ld-powerpc/empty.s: New file.
* testsuite/ld-powerpc/undefweak.d,
* testsuite/ld-powerpc/undefweak.s: New testcase.
* testsuite/ld-powerpc/powerpc.exp: Run it.
2021-05-03 Alan Modra <amodra@gmail.com>
* testsuite/ld-s390/tlspic_64.rd: Adjust expected output for

View File

View File

@ -172,6 +172,7 @@ set ppcelftests {
{"relocatable relaxing large" "-melf32ppc -r --relax" "" "-a32" "relax.s big.s"
{{objdump -dr relaxrl.d}}
"rrelax"}
{"build empty shared library" "-shared" "" "" "empty.s" {} "empty.so"}
}
set ppc64elftests {
@ -487,3 +488,5 @@ run_dump_test "non-contiguous-powerpc"
run_dump_test "tprel32"
run_dump_test "tprelbad"
run_dump_test "undefweak"

View File

@ -0,0 +1,10 @@
#ld: tmpdir/empty.so
#readelf: --dyn-syms -r -W
#...
.* R_PPC(|64)_ADDR(32|64) .* a \+ 0
#...
.* R_PPC(|64)_JMP_SLOT .* b \+ 0
#...
.* WEAK +DEFAULT +UND b
.* WEAK +DEFAULT +UND a

View File

@ -0,0 +1,8 @@
.weak a,b
.data
.dc.a a
.text
.global _start
_start:
bl b
nop