-
-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoongArch hi64 calculation error and PCALA should set plt if sym is imported #1131
Comments
Thanks. Should be fixed in the above commit. |
Slightly off-topic, but as I pointed out several times, I think you guys want to define a "no check" version of I removed the relocation overflow check in the above commit. It's not ideal though. |
Thanks for you pointing out it. I have reported it to our internal group. |
Based on MQ-mengqing's patch. Fixes rui314#1131
I find when I test mold in ArchLinux, something wrongs.
1,hi64 calculation error
The [63:32] bits should be PC-relative, too. The current codes seems only return val-relative.
[1] https://github.com/llvm/llvm-project/blob/main/lld/ELF/Arch/LoongArch.cpp#L158
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/elfnn-loongarch.c;#l2304
2, PCALA should set plt if sym is imported
PCALA used for a long call in -mcmodel=extreme mode. The sequence is "la.pcrel $rxx, $ryy, sym; jirl $ra, $rxx, 0"
So if the sym is imported, we also need add NEED_PLT.
The text was updated successfully, but these errors were encountered: