This website requires JavaScript.
Explore
Help
Sign In
yggdrasil
/
binutils-gdb
Watch
1
Star
0
Fork
0
You've already forked binutils-gdb
Code
Issues
Pull Requests
Packages
Projects
Releases
Wiki
Activity
binutils-gdb
/
ld
/
testsuite
/
ld-loongarch-elf
/
libjirl.s
4 lines
82 B
ArmAsm
Raw
Normal View
History
Unescape
Escape
LoongArch: Fix linker generate PLT entry for data symbol With old "medium" code model, we call a function with a pair of PCALAU12I and JIRL instructions. The assembler produces something like: 8: 1a00000c pcalau12i $t0, 0 8: R_LARCH_PCALA_HI20 g c: 4c000181 jirl $ra, $t0, 0 c: R_LARCH_PCALA_LO12 g The linker generates a "PLT entry" for data without any diagnostic. If "g" is a data symbol and ld with -shared option, it may load two instructions in the PLT. Without -shared option, loongarch_elf_adjust_dynamic_symbol can delete PLT entry. For R_LARCH_PCALA_HI20 relocation, linker only generate PLT entry for STT_FUNC and STT_GNU_IFUNC symbols.
2022-12-01 17:23:14 +08:00
.type
func
@function
LoongArch: ld: Fix bug not generate plt when link a dso Fix the bug that can not generate func@plt when linking a undefined function with cmodel=medium. Add testcase. bfd/ * elfnn-loongarch.c ld/testsuite/ld-loongarch-elf/ * cmodel-libjirl.dd * cmodel.exp * libjirl.s
2022-08-19 15:04:45 +08:00
pcalau
1
2
i
$
r12
,
%
p
c
_
h
i
2
0
(
f
u
n
c
)
jirl
$
r1
,
$
r12
,
%
p
c
_
l
o
1
2
(
f
u
n
c
)
Reference in New Issue
Copy Permalink