binutils-gdb/ld/testsuite/ld-loongarch-elf/protected-func.s
Xi Ruoyao 17cae6980b LoongArch: Make protected function symbols local for -shared
On LoongArch there is no reason to treat STV_PROTECTED STT_FUNC symbols
as preemptible.  See the comment above LARCH_REF_LOCAL for detailed
explanation.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
2024-07-05 12:11:11 +08:00

17 lines
250 B
ArmAsm

# protected function should be non-preemptible and relocated with
# R_LARCH_RELATIVE in shared library, for both GOT and pointer data
.globl x
.protected x
.type x, @function
x:
ret
.globl _start
_start:
la.got $a0, x
ret
.data
p:
.quad x