From eea133e65524218c05bd7a1e93b4fe4241dd8e08 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 24 Jan 2021 04:14:30 -0800 Subject: [PATCH] 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. --- gas/ChangeLog | 7 +++++++ gas/testsuite/gas/elf/elf.exp | 1 + gas/testsuite/gas/elf/pr27228.d | 8 ++++++++ gas/testsuite/gas/elf/pr27228.s | 5 +++++ 4 files changed, 21 insertions(+) create mode 100644 gas/testsuite/gas/elf/pr27228.d create mode 100644 gas/testsuite/gas/elf/pr27228.s 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 -- 2.30.2