aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-mips-elf/mips-elf.exp
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@imgtec.com>2017-05-03 00:05:15 +0100
committerMaciej W. Rozycki <macro@imgtec.com>2017-05-03 00:15:56 +0100
commit82d808edbc7a06f706b82064cec6c3ed88f0c4be (patch)
tree6510e8c35632eba734ed8508067ca9f98f625fc8 /ld/testsuite/ld-mips-elf/mips-elf.exp
parent3d8505928a06e00b05bb162c1ad0dd612c1c16af (diff)
downloadgdb-82d808edbc7a06f706b82064cec6c3ed88f0c4be.zip
gdb-82d808edbc7a06f706b82064cec6c3ed88f0c4be.tar.gz
gdb-82d808edbc7a06f706b82064cec6c3ed88f0c4be.tar.bz2
MIPS16/GAS: Fix absolute references with PC-relative synthetic instructions
Complement commit 88a7ef168927 ("MIPS16/GAS: Restore unsupported relocation diagnostics") and also propagate constant expressions, either already reduced from absolute symbol references or created from literals in the first place, used as a PC-relative operand with the MIPS16 LA, LW, DLA and LD synthetic instructions to relaxation, matching the way forward absolute symbol references have been handled as from the commit referred and letting relaxation produce any necessary relocations, if possible, for the absolute value requested to be reproduced at the run time. Call `symbol_append' for any expression symbol created for the purpose of MIPS16 relaxation as with constant expressions now propagated from earlier on such symbols may make it through and have R_MIPS16_PC16_S1 relocations emitted against, and therefore need to appear in the symbol table produced. gas/ * config/tc-mips.c (append_insn): Call `symbol_append' for any expression symbol created for MIPS16 relaxation. (match_mips16_insn): Don't encode a constant value as an immediate with a PC-relative operand. * testsuite/gas/mips/mips16-pcrel-absolute-1.d: New test. * testsuite/gas/mips/mips16-branch-absolute-1.d: New test. * testsuite/gas/mips/mips16-branch-absolute-2.d: New test. * testsuite/gas/mips/mips16-branch-absolute-addend-1.d: New test. * testsuite/gas/mips/mips16-branch-absolute-n32-1.d: New test. * testsuite/gas/mips/mips16-branch-absolute-n32-2.d: New test. * testsuite/gas/mips/mips16-branch-absolute-addend-n32-1.d: New test. * testsuite/gas/mips/mips16-branch-absolute-n64-1.d: New test. * testsuite/gas/mips/mips16-branch-absolute-n64-2.d: New test. * testsuite/gas/mips/mips16-branch-absolute-addend-n64-1.d: New test. * testsuite/gas/mips/mips16-pcrel-absolute-1.l: New stderr output. * testsuite/gas/mips/mips16-pcrel-absolute-1.s: New test source. * testsuite/gas/mips/mips16-branch-absolute-1.s: New test source. * testsuite/gas/mips/mips16-branch-absolute-2.s: New test source. * testsuite/gas/mips/mips16-branch-absolute-addend-1.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests. ld/ * testsuite/ld-mips-elf/mips16-branch-absolute-1.d: New test. * testsuite/ld-mips-elf/mips16-branch-absolute-2.d: New test. * testsuite/ld-mips-elf/mips16-branch-absolute-addend-1.d: New test. * testsuite/ld-mips-elf/mips16-branch-absolute-n32-1.d: New test. * testsuite/ld-mips-elf/mips16-branch-absolute-n32-2.d: New test. * testsuite/ld-mips-elf/mips16-branch-absolute-addend-n32-1.d: New test. * testsuite/ld-mips-elf/mips16-branch-absolute-n64-1.d: New test. * testsuite/ld-mips-elf/mips16-branch-absolute-n64-2.d: New test. * testsuite/ld-mips-elf/mips16-branch-absolute-addend-n64-1.d: New test. * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
Diffstat (limited to 'ld/testsuite/ld-mips-elf/mips-elf.exp')
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index f824e7c..068ea54 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -159,17 +159,33 @@ run_dump_test "mips16-branch-3" [list [list ld $abi_ldflags(o32)]]
run_dump_test "mips16-branch-addend-2" [list [list ld $abi_ldflags(o32)]]
run_dump_test "mips16-branch-addend-3" [list [list ld $abi_ldflags(o32)]]
run_dump_test "mips16-branch-absolute" [list [list ld $abi_ldflags(o32)]]
+run_dump_test "mips16-branch-absolute-1" [list [list ld $abi_ldflags(o32)]]
+run_dump_test "mips16-branch-absolute-2" [list [list ld $abi_ldflags(o32)]]
run_dump_test "mips16-branch-absolute-addend" \
[list [list ld $abi_ldflags(o32)]]
+run_dump_test "mips16-branch-absolute-addend-1" \
+ [list [list ld $abi_ldflags(o32)]]
if $has_newabi {
run_dump_test "mips16-branch-absolute-n32" \
[list [list ld $abi_ldflags(n32)]]
+ run_dump_test "mips16-branch-absolute-n32-1" \
+ [list [list ld $abi_ldflags(n32)]]
+ run_dump_test "mips16-branch-absolute-n32-2" \
+ [list [list ld $abi_ldflags(n32)]]
run_dump_test "mips16-branch-absolute-addend-n32" \
[list [list ld $abi_ldflags(n32)]]
+ run_dump_test "mips16-branch-absolute-addend-n32-1" \
+ [list [list ld $abi_ldflags(n32)]]
run_dump_test "mips16-branch-absolute-n64" \
[list [list ld $abi_ldflags(n64)]]
+ run_dump_test "mips16-branch-absolute-n64-1" \
+ [list [list ld $abi_ldflags(n64)]]
+ run_dump_test "mips16-branch-absolute-n64-2" \
+ [list [list ld $abi_ldflags(n64)]]
run_dump_test "mips16-branch-absolute-addend-n64" \
[list [list ld $abi_ldflags(n64)]]
+ run_dump_test "mips16-branch-absolute-addend-n64-1" \
+ [list [list ld $abi_ldflags(n64)]]
}
run_dump_test "micromips-branch-absolute" [list [list ld $abi_ldflags(o32)]]