[PATCH] D149751: [LLD][ELF][RISCV] Add auipc->lui relaxation.
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 11:18:39 PDT 2023
jrtc27 added a comment.
In D149751#4316073 <https://reviews.llvm.org/D149751#4316073>, @MaskRay wrote:
>> This relaxation enables use of weak undefined symbols in programms written with medany code model in mind if code section happens to be placed far from zero address(>2GiB).
>
> I think the motivation is not right. For such weak references, the compiler should generate GOT-generating relocations, not relying on linker relaxation (which is an optional feature) for correctness.
>
> https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/201 "Not doing so is deprecated and a future version of this specification will require using the GOT, not just advise."
I need to get back to my LLVM patch to do that :( if someone wants to commandeer the series that's fine by me otherwise I'll try and do it once I'm finished with what I'm currently preoccupied with.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149751/new/
https://reviews.llvm.org/D149751
More information about the llvm-commits
mailing list