aboutsummaryrefslogtreecommitdiff
path: root/ld/ldver.c
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-12-25 12:41:43 +0800
committercailulu <cailulu@loongson.cn>2024-12-27 17:52:29 +0800
commitbd94e7cd84c19da4a37dbdbc2d5587db6383f28c (patch)
treebd95e91fa2af12e704cf5a79194fd5a4a3c3d7b9 /ld/ldver.c
parente65a355022d0dc6b5707310876a72b5693ec0aa5 (diff)
downloadgdb-bd94e7cd84c19da4a37dbdbc2d5587db6383f28c.zip
gdb-bd94e7cd84c19da4a37dbdbc2d5587db6383f28c.tar.gz
gdb-bd94e7cd84c19da4a37dbdbc2d5587db6383f28c.tar.bz2
LoongArch: Fix resolution of undefined weak hidden/protected symbols
An undefined weak hidden/protect symbol should be resolved to runtime address 0, but we were actually resolving it to link-time address 0. So in PIE or DSO the runtime address would be incorrect. Fix the issue by rewriting pcalau12i to lu12i.w, and pcaddi to addi.w. The latter does not always work because the immediate field of addi.w is narrower, report an error in the case the addend is too large. Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Diffstat (limited to 'ld/ldver.c')
0 files changed, 0 insertions, 0 deletions