From: H.J. Lu Date: Sun, 24 Jan 2021 12:14:30 +0000 (-0800) Subject: gas: Add a testcase for PR gas/27228 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eea133e65524218c05bd7a1e93b4fe4241dd8e08;p=binutils-gdb.git gas: Add a testcase for PR gas/27228 PR gas/27228 * testsuite/gas/elf/elf.exp: Run pr27228. * testsuite/gas/elf/pr27228.d: New file. * testsuite/gas/elf/pr27228.s: Likewise. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 4ac29870e63..8cdcbc5088f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2021-01-24 H.J. Lu + + PR gas/27228 + * testsuite/gas/elf/elf.exp: Run pr27228. + * testsuite/gas/elf/pr27228.d: New file. + * testsuite/gas/elf/pr27228.s: Likewise. + 2021-01-24 Alan Modra PR 27228 diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 4f7ff6a2e01..4a695dfbaed 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -328,4 +328,5 @@ if { [is_elf_format] } then { run_dump_test "bignums" run_dump_test "section-symbol-redef" + run_dump_test "pr27228" } diff --git a/gas/testsuite/gas/elf/pr27228.d b/gas/testsuite/gas/elf/pr27228.d new file mode 100644 index 00000000000..a44a61ec0fd --- /dev/null +++ b/gas/testsuite/gas/elf/pr27228.d @@ -0,0 +1,8 @@ +#as: +#name: .reloc against undefined local symbol (PR 27228) +#readelf: -sW + +Symbol table '\.symtab' contains [0-9]+ entries: +#... + +[a-f0-9]+: 0+ +0 NOTYPE +GLOBAL DEFAULT +UND .LTHUNK5.lto_priv.0 +#pass diff --git a/gas/testsuite/gas/elf/pr27228.s b/gas/testsuite/gas/elf/pr27228.s new file mode 100644 index 00000000000..5ed301d5ac7 --- /dev/null +++ b/gas/testsuite/gas/elf/pr27228.s @@ -0,0 +1,5 @@ + .text +foo: + .reloc 1f,BFD_RELOC_NONE,.LTHUNK5.lto_priv.0 +1: + .nop