RISC-V: Also, fixed more ld testcases for --with-arch and --with-abi

Well these testcases cannot be fixed by .option norvc simply, that is because
current linker needs to check mapping symbols before doing any rvc relaxations,
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/393

Once we support the above features, we can revert this patch.
This commit is contained in:
Nelson Chu
2025-09-12 12:24:19 +08:00
parent 0f0b6cec20
commit 9737907a9b
6 changed files with 12 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
#source: pcgp-relax-01.s
#ld: --no-relax-gp --relax
#as: -march=rv64i
#ld: --no-relax-gp --relax -m[riscv_choose_lp64_emul]
#objdump: -d -Mno-aliases
.*:[ ]+file format .*

View File

@@ -1,5 +1,6 @@
#source: pcgp-relax-01.s
#ld: --relax
#as: -march=rv64i
#ld: --relax -m[riscv_choose_lp64_emul]
#objdump: -d -Mno-aliases
.*:[ ]+file format .*

View File

@@ -1,5 +1,6 @@
#source: relax-max-align-gp.s
#ld:
#as: -march=rv64i
#ld: -m[riscv_choose_lp64_emul]
#objdump: -d
.*:[ ]+file format .*

View File

@@ -1,5 +1,6 @@
#source: relro-relax-lui.s
#ld: -zrelro --relax
#as: -march=rv64i
#ld: -zrelro --relax -m[riscv_choose_lp64_emul]
#objdump: -d -Mno-aliases
.*:[ ]+file format .*

View File

@@ -1,6 +1,7 @@
#source: variant_cc-1.s
#source: variant_cc-2.s
#ld: -shared --hash-style=sysv -Ttext 0x8000 -z now
#as: -march=rv64i -mabi=lp64
#ld: -shared --hash-style=sysv -Ttext 0x8000 -z now -m[riscv_choose_lp64_emul]
#readelf: -rsW
Relocation section '.rela.plt' at .*

View File

@@ -1,6 +1,7 @@
#source: variant_cc-1.s
#source: variant_cc-2.s
#ld: -shared --hash-style=sysv -Ttext 0x8000
#as: -march=rv64i -mabi=lp64
#ld: -shared --hash-style=sysv -Ttext 0x8000 -m[riscv_choose_lp64_emul]
#readelf: -rsW
Relocation section '.rela.plt' at .*