-
Notifications
You must be signed in to change notification settings - Fork 3
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
add loongarch64 arch support #4
Conversation
Thank you for your contribution! I wonder why the jump entries are designed to use absolute address instead of relative address? Does Loongarch Linux not support ASLR? |
Loongarch Linux supports ASLR. When I use relative addresses in Rust's inline assembly, I find that the values in jump entry are all 0, so I use absolute addresses instead. |
It's strange. Maybe an LLVM bug? Anyway, using absolute addresses here is not suitable for applications with ASLR enabled, since those addresses may be relocated somewhere else at run time. |
Maybe I can ask someone at loongarch. |
The cross-rs tool currently uses the gnu toolchain for linking, but the version of binutils is low and does not support the relocation of R_LARCH_64_PCREL, so error occurs in calculating relative addresses. I can change the code to calculate relative addresses, but that might not pass the cross test. |
Is there any tracking issue for this problem at Rust main repository or cross-rs repo or anywhere else? I could track it and merge the PR after corresponding issue is solved. |
Maybe this cross-rs/cross#973 |
Thanks for your contribution to LoongArch. This is the tracking issue for this: cross-rs/cross#1538 |
It seems that the cross-rs has updated the binutils toolchain. Would you update your code for relative addresses? :) |
…lear cache for linux OS
Thank you :) |
No description provided.