mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
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.
6 lines
297 B
Makefile
6 lines
297 B
Makefile
#name: PC-relative relocation making shared
|
|
#source: bad_pcrel20_s2_weak.s
|
|
#target: [check_shared_lib_support]
|
|
#ld: -shared --defsym global_a=0x10 --defsym global_b=0x20
|
|
#error: .*: relocation R_LARCH_PCREL20_S2 against `global_b` can not be used when making a shared object; recompile with -fPIC
|