diff options
Diffstat (limited to 'ld/testsuite')
4 files changed, 25 insertions, 1 deletions
diff --git a/ld/testsuite/ld-riscv-elf/code-model-relax-medlow-01-norelaxgp.d b/ld/testsuite/ld-riscv-elf/code-model-relax-medlow-01-norelaxgp.d new file mode 100644 index 0000000..8e40cc5 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/code-model-relax-medlow-01-norelaxgp.d @@ -0,0 +1,4 @@ +#source: code-model.s +#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1 +#ld: -Tcode-model-01.ld -melf64lriscv --no-relax-gp --relax +#error: .*relocation truncated to fit: R_RISCV_HI20 against `symbolL' diff --git a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp index 0f7ccd9..5dd6144 100644 --- a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp +++ b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp @@ -122,6 +122,7 @@ if [istarget "riscv*-*-*"] { run_dump_test "align-small-region" run_dump_test "call-relax" run_dump_test "pcgp-relax-01" + run_dump_test "pcgp-relax-01-norelaxgp" run_dump_test "pcgp-relax-02" run_dump_test "c-lui" run_dump_test "c-lui-2" @@ -141,6 +142,7 @@ if [istarget "riscv*-*-*"] { run_dump_test "code-model-medany-weakref-01" run_dump_test "code-model-medany-weakref-02" run_dump_test "code-model-relax-medlow-01" + run_dump_test "code-model-relax-medlow-01-norelaxgp" run_dump_test "code-model-relax-medlow-02" run_dump_test "code-model-relax-medlow-weakref-01" run_dump_test "code-model-relax-medlow-weakref-02" diff --git a/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d b/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d new file mode 100644 index 0000000..d134457 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d @@ -0,0 +1,18 @@ +#source: pcgp-relax-01.s +#ld: --no-relax-gp --relax +#objdump: -d -Mno-aliases + +.*:[ ]+file format .* + + +Disassembly of section \.text: + +0+[0-9a-f]+ <_start>: +.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,[0-9]+ +.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start> +.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1,0x[0-9a-f]+ +.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,[0-9]+ # [0-9a-f]+ <data_g> +.*:[ ]+[0-9a-f]+[ ]+lui[ ]+a2,0x[0-9a-f]+ +.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,a2,[0-9]+ # [0-9a-f]+ <data_g> +.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a3,tp,0 # 0 <data_t> +.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a0,0x[0-9a-f]+ diff --git a/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d b/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d index 1248132..055f03e 100644 --- a/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d +++ b/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d @@ -1,6 +1,6 @@ #source: pcgp-relax-02.s #as: -#ld: --relax +#ld: --relax --relax-gp #objdump: -d .*:[ ]+file format .* |