Skip to content
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

Deprecated R_RISCV_CALL, prefer R_RISCV_CALL_PLT #340

Merged
merged 1 commit into from
Aug 23, 2022
Merged

Conversation

kito-cheng
Copy link
Collaborator

@kito-cheng kito-cheng commented Aug 22, 2022

Fix #98 and #307.

@kito-cheng kito-cheng requested a review from jrtc27 August 22, 2022 13:38
@MaskRay
Copy link
Collaborator

MaskRay commented Aug 22, 2022

This should reference #98 . #307 is a duplicate.

We have same behavoir for R_RISCV_CALL and R_RISCV_CALL_PLT now, and
prefer R_RISCV_CALL_PLT.

Fix #98 and #307.
@kito-cheng kito-cheng merged commit 360ec15 into master Aug 23, 2022
@kito-cheng kito-cheng deleted the deprecate-call branch August 23, 2022 13:53
@kito-cheng kito-cheng added this to the Public Review for 1.0 milestone Sep 2, 2022
mtvec added a commit to llvm/llvm-project that referenced this pull request May 8, 2023
R_RISCV_CALL has been deprecated. [1] Both GCC and LLVM seem to not
generate it anymore and always use R_RISCV_CALL_PLT (even for calls that
do not need a PLT entry). Generating PLT entries based on relocation
type is not recommended and a better heuristic is to only generate them
when the target symbol is preemptable [2]. This patch implements this by
only generating PLT entries for undefined symbols.

[1] riscv-non-isa/riscv-elf-psabi-doc#340
[2] riscv-non-isa/riscv-elf-psabi-doc#98

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D149525
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

R_RISCV_CALL vs R_RISCV_CALL_PLT
2 participants