binutils-gdb/ld/testsuite/ld-loongarch-elf
Lulu Cai 4cb77761d6 LoongArch: Check PC-relative relocations for shared libraries
Building shared libraries should not be allowed for PC-relative
relocations against external symbols.
Currently LoongArch has no corresponding checks and silently
generates wrong shared libraries.

However, In the first version of the medium cmodel, pcalau12i+jirl was
used for function calls, in which case PC-relative relocations were
allowed.
2024-10-17 21:01:52 +08:00
..
64_pcrel.d LoongArch: Add R_LARCH_64_PCREL relocation support 2023-06-28 16:14:35 +08:00
64_pcrel.s LoongArch: Add R_LARCH_64_PCREL relocation support 2023-06-28 16:14:35 +08:00
abi1_max_imm.dd LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
abi1_max_imm.s LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
abi1_sops.s LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
abi2_max_imm.s LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
abi2_overflows.s LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
abs-global.out Not append rela for absolute symbol 2024-09-07 10:07:13 +08:00
abs-global.s Not append rela for absolute symbol 2024-09-07 10:07:13 +08:00
abssym_pie.d LoongArch: Not alloc dynamic relocs if symbol is absolute 2024-07-11 09:27:22 +08:00
abssym_shared.d LoongArch: Not alloc dynamic relocs if symbol is absolute 2024-07-11 09:27:22 +08:00
abssym.s LoongArch: Not alloc dynamic relocs if symbol is absolute 2024-07-11 09:27:22 +08:00
anno-sym.d LoongArch: Remove unused code in ld test suite 2024-07-01 10:12:59 +08:00
anno-sym.l LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN 2023-12-22 14:20:18 +08:00
anno-sym.s LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN 2023-12-22 14:20:18 +08:00
attr-ifunc-4.c
attr-ifunc-4.out
bad_pcala_hi20_global.d LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
bad_pcala_hi20_global.s LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
bad_pcala_hi20_weak.d LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
bad_pcala_hi20_weak.s LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
bad_pcrel20_s2_global.d LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
bad_pcrel20_s2_global.s LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
bad_pcrel20_s2_weak.d LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
bad_pcrel20_s2_weak.s LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
binary.ld LoongArch: Add support for OUTPUT_FORMAT("binary") 2024-08-05 17:38:49 +08:00
binary.s LoongArch: Add support for OUTPUT_FORMAT("binary") 2024-08-05 17:38:49 +08:00
cmodel-libjirl.dd LoongArch: ld: Fix bug not generate plt when link a dso 2022-08-24 14:27:03 +08:00
cmodel.exp Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
data-got.d LoongArch: ld: Move .got .got.plt before .data and protect .got with relro 2024-04-09 14:31:04 +08:00
data-got.s LoongArch: ld: Move .got .got.plt before .data and protect .got with relro 2024-04-09 14:31:04 +08:00
data-plt.s LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
desc-ie-reloc.d LoongArch: TLS IE needs only one dynamic reloc 2024-06-20 16:55:24 +08:00
desc-ie.d LoongArch: TLS IE needs only one dynamic reloc 2024-06-20 16:55:24 +08:00
desc-ie.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
desc-le-norelax.d LoongArch: Fix gas and ld test cases 2024-03-12 17:37:12 +08:00
desc-le-norelax.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
desc-le-relax.d LoongArch: Fix gas and ld test cases 2024-03-12 17:37:12 +08:00
desc-le-relax.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
desc-norelax.d LoongArch: Fix some test failures about TLS desc and TLS relaxation 2024-01-22 17:14:36 +08:00
desc-norelax.s LoongArch: Add testsuit for DESC and tls transition and tls relaxation. 2023-12-25 11:46:22 +08:00
desc-relax.d LoongArch: Fix some test failures about TLS desc and TLS relaxation 2024-01-22 17:14:36 +08:00
desc-relax.s LoongArch: Add testsuit for DESC and tls transition and tls relaxation. 2023-12-25 11:46:22 +08:00
disas-jirl-32.d LoongArch: ld: Add support for linker relaxation. 2023-05-30 19:56:48 +08:00
disas-jirl-32.s
disas-jirl.d LoongArch: ld: Add support for linker relaxation. 2023-05-30 19:56:48 +08:00
disas-jirl.s
get_abs_global_sym.c Not append rela for absolute symbol 2024-09-07 10:07:13 +08:00
ie-le-norelax.d LoongArch: Fix gas and ld test cases 2024-03-12 17:37:12 +08:00
ie-le-norelax.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
ie-le-relax.d LoongArch: Fix gas and ld test cases 2024-03-12 17:37:12 +08:00
ie-le-relax.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
ifunc-reloc.d LoongArch: Make protected function symbols local for -shared 2024-07-05 12:11:11 +08:00
ifunc-reloc.s LoongArch: Fix bad reloc with mixed visibility ifunc symbols in shared libraries 2024-07-05 12:11:11 +08:00
ifunc.exp Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
jmp_op.d opcodes/loongarch: do not print hex notation for signed immediates 2023-06-30 10:18:01 +08:00
jmp_op.s opcodes: LoongArch: add "ret" instruction to reduce typing 2022-08-01 15:57:32 +08:00
ld-loongarch-elf.exp LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
libjirl.s LoongArch: Fix linker generate PLT entry for data symbol 2024-01-04 19:08:53 +08:00
libnopic-global.s
local-ifunc-reloc.d LoongArch: Fix loongarch*-elf target ld testsuite failure 2024-01-04 16:44:20 +08:00
local-ifunc-reloc.s LoongArch: Fix R_LARCH_IRELATIVE insertion after elf_link_sort_relocs 2022-09-20 17:16:06 +08:00
macro_op_32.d LoongArch: Fix gas and ld test cases 2024-03-12 17:37:12 +08:00
macro_op_32.s
macro_op.d LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
macro_op.s
max_imm_b16.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
max_imm_b21.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
max_imm_b26.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
max_imm_pcrel20.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
medium-call.s LoongArch: Add call36 and tail36 pseudo instructions for medium code model 2023-12-18 18:36:29 +08:00
nopic-global-so.rd
nopic-global-so.sd
nopic-global.out
nopic-global.s
nopic-global.sd
nopic-global.xd
nopic-local.out
nopic-local.rd
nopic-local.s
nopic-local.sd
nopic-local.xd
nopic-weak-global-so.rd
nopic-weak-global-so.sd
nopic-weak-global.out
nopic-weak-global.s
nopic-weak-global.sd
nopic-weak-global.xd
nopic-weak-local.out
nopic-weak-local.rd
nopic-weak-local.s
nopic-weak-local.sd
nopic-weak-local.xd
old-tls-le.s LoongArch: ld: Add support for tls le relax. 2023-12-29 15:11:01 +08:00
overflow_b16.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_b21.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_b26.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_pcrel20.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_s_0_5_10_16_s2.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_s_0_10_10_16_s2.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_s_5_20.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_s_10_5.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_s_10_12.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_s_10_16_s2.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_s_10_16.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_u_10_12.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
overflow_u.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
partial-link-align-a.s LoongArch: Add -mignore-start-align option 2024-04-20 12:10:40 +08:00
partial-link-align-b.s LoongArch: Add -mignore-start-align option 2024-04-20 12:10:40 +08:00
pcala64.d LoongArch: Adapt R_LARCH_{PCALA,GOT,TLS_IE,TLS_DESC}64_* handling per psABI v2.30 2024-01-17 15:15:33 +08:00
pcala64.s LoongArch: Adapt R_LARCH_{PCALA,GOT,TLS_IE,TLS_DESC}64_* handling per psABI v2.30 2024-01-17 15:15:33 +08:00
pic.exp LoongArch: Fix ld FAIL test cases 2024-08-01 10:23:37 +08:00
pic.ld
pie_discard.d Avoid unused space in .rela.dyn if sec was discarded 2024-02-27 11:58:33 +08:00
pie_discard.s Avoid unused space in .rela.dyn if sec was discarded 2024-02-27 11:58:33 +08:00
pie_discard.t Avoid unused space in .rela.dyn if sec was discarded 2024-02-27 11:58:33 +08:00
protected-func.d LoongArch: Make protected function symbols local for -shared 2024-07-05 12:11:11 +08:00
protected-func.s LoongArch: Make protected function symbols local for -shared 2024-07-05 12:11:11 +08:00
provide_abs.d LoongArch: Fix wrong relocation handling of symbols defined by PROVIDE 2024-08-26 17:25:45 +08:00
provide_abs.ld LoongArch: Fix wrong relocation handling of symbols defined by PROVIDE 2024-08-26 17:25:45 +08:00
provide_noabs.d LoongArch: Fix wrong relocation handling of symbols defined by PROVIDE 2024-08-26 17:25:45 +08:00
provide_noabs.ld LoongArch: Fix wrong relocation handling of symbols defined by PROVIDE 2024-08-26 17:25:45 +08:00
provide_sym.s LoongArch: Fix wrong relocation handling of symbols defined by PROVIDE 2024-08-26 17:25:45 +08:00
r_larch_32_elf64.d LoongArch: Reject R_LARCH_32 from becoming a runtime reloc in ELFCLASS64 2024-07-05 12:11:10 +08:00
r_larch_32_elf64.s LoongArch: Reject R_LARCH_32 from becoming a runtime reloc in ELFCLASS64 2024-07-05 12:11:10 +08:00
relax-align-discard.lds BFD: Fix the bug of R_LARCH_AGLIN caused by discard section 2024-03-31 14:21:00 +08:00
relax-align-discard.s BFD: Fix the bug of R_LARCH_AGLIN caused by discard section 2024-03-31 14:21:00 +08:00
relax-align-ignore-start.d LoongArch: Add -mignore-start-align option 2024-04-20 12:10:40 +08:00
relax-align-ignore-start.s LoongArch: Add -mignore-start-align option 2024-04-20 12:10:40 +08:00
relax-align.dd LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN 2023-12-22 14:20:18 +08:00
relax-align.s LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN 2023-12-22 14:20:18 +08:00
relax-bound-check-tls-le.s LoongArch: ld: Add support for tls le relax. 2023-12-29 15:11:01 +08:00
relax-call36-exe.s LoongArch: Add more relaxation support for call36 2024-10-15 14:26:17 +08:00
relax-call36-so.s LoongArch: Add more relaxation support for call36 2024-10-15 14:26:17 +08:00
relax-medium-call-1.d LoongArch: Fix relaxation overflow caused by ld -z separate-code 2024-05-27 17:41:04 +08:00
relax-medium-call-1.s LoongArch: Fix relaxation overflow caused by ld -z separate-code 2024-05-27 17:41:04 +08:00
relax-medium-call.d LoongArch: Fix relaxation overflow caused by ld -z separate-code 2024-05-27 17:41:04 +08:00
relax-medium-call.s LoongArch: Fix relaxation overflow caused by ld -z separate-code 2024-05-27 17:41:04 +08:00
relax-section-align-overflow.s LoongArch: Fix relaxation overflow caused by section alignment 2024-01-12 15:38:42 +08:00
relax-segment-max.s LoongArch: Add more relaxation testcases 2023-11-17 16:38:55 +08:00
relax-segment-min.s LoongArch: Add more relaxation testcases 2023-11-17 16:38:55 +08:00
relax-separate-code-overflow.s LoongArch: Fix relaxation overflow caused by ld -z separate-code 2024-05-27 17:41:04 +08:00
relax-so.s LoongArch: Add more relaxation testcases 2023-11-17 16:38:55 +08:00
relax-tls-le.s LoongArch: ld: Add support for tls le relax. 2023-12-29 15:11:01 +08:00
relax-ttext.s LoongArch: Disable linker relaxation if set the address of section or segment 2024-06-04 19:47:27 +08:00
relax.exp LoongArch: Add more relaxation support for call36 2024-10-15 14:26:17 +08:00
relax.s LoongArch: ld: Add support for linker relaxation. 2023-05-30 19:56:48 +08:00
reloc_abs_with_shared.d LoongArch: Add bad static relocation check and output more information to user 2024-04-25 09:21:26 +08:00
reloc_abs_with_shared.s LoongArch: Add bad static relocation check and output more information to user 2024-04-25 09:21:26 +08:00
reloc_le_with_shared.d LoongArch: Add bad static relocation check and output more information to user 2024-04-25 09:21:26 +08:00
reloc_le_with_shared.s LoongArch: Add bad static relocation check and output more information to user 2024-04-25 09:21:26 +08:00
reloc_ler_with_shared.d LoongArch: Add bad static relocation check and output more information to user 2024-04-25 09:21:26 +08:00
reloc_ler_with_shared.s LoongArch: Add bad static relocation check and output more information to user 2024-04-25 09:21:26 +08:00
relr-addend.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-addend.s LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-align.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-align.s LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-data-pie.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-data-shared.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-data.s LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-discard-pie.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-discard-shared.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-discard.ld LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-discard.s LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-got-pie.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-got-shared.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-got-start.d LoongArch: Fix assertion failure with DT_RELR 2024-08-14 17:45:02 +08:00
relr-got-start.s LoongArch: Fix assertion failure with DT_RELR 2024-08-14 17:45:02 +08:00
relr-got.s LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-relocs.ld LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-text-pie.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-text-shared.d LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
relr-text.s LoongArch: Add DT_RELR tests 2024-07-05 12:11:11 +08:00
syscall-0.s
syscall-1.s
syscall.d
tls-le-norelax.d LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
tls-le-norelax.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
tls-le-relax.d LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
tls-le-relax.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
tls-relax-compatible-check-new.s LoongArch: ld: Add support for tls le relax. 2023-12-29 15:11:01 +08:00
tls-relax-compatible-check-old.s LoongArch: ld: Add support for tls le relax. 2023-12-29 15:11:01 +08:00
tlsdesc_abs.d LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
tlsdesc_abs.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
tlsdesc_extreme.d LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
tlsdesc_extreme.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
tlsdesc-dso-reloc.d LoongArch: TLS IE needs only one dynamic reloc 2024-06-20 16:55:24 +08:00
tlsdesc-dso.d LoongArch: TLS IE needs only one dynamic reloc 2024-06-20 16:55:24 +08:00
tlsdesc-dso.s LoongArch: Fix some test cases for TLS transition and relax 2024-03-06 14:47:03 +08:00
uleb128.dd LoongArch: ld: Add support for linker relaxation. 2023-05-30 19:56:48 +08:00
uleb128.s LoongArch: ld: Add support for linker relaxation. 2023-05-30 19:56:48 +08:00
underflow_b16.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_b21.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_b26.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_pcrel20.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_s_0_5_10_16_s2.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_s_0_10_10_16_s2.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_s_5_20.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_s_10_5.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_s_10_12.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_s_10_16_s2.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00
underflow_s_10_16.d LoongArch: ld: Fix other pop relocs overflow check and add tests 2024-02-27 11:54:34 +08:00