aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNelson Chu <nelson@rivosinc.com>2022-09-14 10:25:44 +0800
committerNelson Chu <nelson@rivosinc.com>2022-09-21 09:45:58 +0800
commit70f35d72ef04cd23771875c1661c9975044a749c (patch)
tree9e21e16588b2fe41a2dc718ad38df24892b1da2b /ld
parente348122963d188295fcdd3758a112f1e089d1d14 (diff)
downloadgdb-70f35d72ef04cd23771875c1661c9975044a749c.zip
gdb-70f35d72ef04cd23771875c1661c9975044a749c.tar.gz
gdb-70f35d72ef04cd23771875c1661c9975044a749c.tar.bz2
RISC-V: Always generate R_RISCV_CALL_PLT reloc for call in assembler.
Since we have the same behaviors of CALL and CALL_PLT relocs in linker for now, https://github.com/bminor/binutils-gdb/commit/3b1450b38c644f99aa2e211747b428b9f8d15cca And the psabi already deprecate the CALL reloc, https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a0dced85018d7a0ec17023c9389cbd70b1dbc1b0 Therefore, we should always generate R_RISCV_CALL_PLT reloc for call, even if it has @plt postfix. I believe LLVM (https://reviews.llvm.org/D132530) already support this, so GNU as should do the same thing. gas/ * config/tc-riscv.c (riscv_ip): Always generate CALL_PLT reloc for call, even if it has @plt postfix. * testsuite/gas/riscv/no-relax-reloc.d: Updated CALL to CALL_PLT. * testsuite/gas/riscv/relax-reloc.d: Likewise. ld/ * testsuite/ld-riscv-elf/variant_cc-r.d: Updated CALL to CALL_PLT.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ld-riscv-elf/variant_cc-r.d56
1 files changed, 28 insertions, 28 deletions
diff --git a/ld/testsuite/ld-riscv-elf/variant_cc-r.d b/ld/testsuite/ld-riscv-elf/variant_cc-r.d
index 5235b8e..7df449b 100644
--- a/ld/testsuite/ld-riscv-elf/variant_cc-r.d
+++ b/ld/testsuite/ld-riscv-elf/variant_cc-r.d
@@ -6,34 +6,34 @@
Relocation section '.rela.text' at .*
#...
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+cc_global_default_def \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+cc_global_default_undef \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+cc_global_hidden_def \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+cc_global_default_ifunc\(\)[ ]+cc_global_default_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+cc_global_hidden_ifunc\(\)[ ]+cc_global_hidden_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+cc_local \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+cc_local_ifunc\(\)[ ]+cc_local_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+nocc_global_default_def \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+nocc_global_default_undef \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+nocc_global_hidden_def \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+nocc_global_default_ifunc\(\)[ ]+nocc_global_default_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+nocc_global_hidden_ifunc\(\)[ ]+nocc_global_hidden_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+nocc_local \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+nocc_local_ifunc\(\)[ ]+nocc_local_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+cc_global_default_def \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+cc_global_default_undef \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+cc_global_hidden_def \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+cc_global_default_ifunc\(\)[ ]+cc_global_default_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+cc_global_hidden_ifunc\(\)[ ]+cc_global_hidden_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0070[ ]+cc_local2 \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+cc_local2_ifunc\(\)[ ]+cc_local2_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+nocc_global_default_def \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+nocc_global_default_undef \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0000[ ]+nocc_global_hidden_def \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+nocc_global_default_ifunc\(\)[ ]+nocc_global_default_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+nocc_global_hidden_ifunc\(\)[ ]+nocc_global_hidden_ifunc \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+0+0070[ ]+nocc_local2 \+ 0
-[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL[ ]+nocc_local2_ifunc\(\)[ ]+nocc_local2_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+cc_global_default_def \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+cc_global_default_undef \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+cc_global_hidden_def \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+cc_global_default_ifunc\(\)[ ]+cc_global_default_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+cc_global_hidden_ifunc\(\)[ ]+cc_global_hidden_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+cc_local \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+cc_local_ifunc\(\)[ ]+cc_local_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+nocc_global_default_def \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+nocc_global_default_undef \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+nocc_global_hidden_def \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+nocc_global_default_ifunc\(\)[ ]+nocc_global_default_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+nocc_global_hidden_ifunc\(\)[ ]+nocc_global_hidden_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+nocc_local \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+nocc_local_ifunc\(\)[ ]+nocc_local_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+cc_global_default_def \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+cc_global_default_undef \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+cc_global_hidden_def \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+cc_global_default_ifunc\(\)[ ]+cc_global_default_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+cc_global_hidden_ifunc\(\)[ ]+cc_global_hidden_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0070[ ]+cc_local2 \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+cc_local2_ifunc\(\)[ ]+cc_local2_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+nocc_global_default_def \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+nocc_global_default_undef \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0000[ ]+nocc_global_hidden_def \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+nocc_global_default_ifunc\(\)[ ]+nocc_global_default_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+nocc_global_hidden_ifunc\(\)[ ]+nocc_global_hidden_ifunc \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+0+0070[ ]+nocc_local2 \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_CALL_PLT[ ]+nocc_local2_ifunc\(\)[ ]+nocc_local2_ifunc \+ 0
#...
Symbol table '.symtab' contains .*
.*