diff options
| author | Fangrui Song <maskray@google.com> | 2019-07-01 17:12:18 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2019-07-01 17:12:18 +0000 |
| commit | f01fa40a00614fb2ca0282644375849e0aa650ce (patch) | |
| tree | 5e47d290098a3ca2c6eabc7945a4968bfbdd547e /llvm/lib | |
| parent | 1094e6a81430e76f0a6b836f52fa6e21726f5e6d (diff) | |
| download | bcm5719-llvm-f01fa40a00614fb2ca0282644375849e0aa650ce.tar.gz bcm5719-llvm-f01fa40a00614fb2ca0282644375849e0aa650ce.zip | |
[ELF][RISCV] Support PLT, GOT, copy and relative relocations
* Handle initial relocation types: R_RISCV_CALL_PLT and R_RISCV_GOT_HI20.
* Produce dynamic relocation types: R_RISCV_COPY, R_RISCV_RELATIVE, R_RISCV_JUMP_SLOT.
* Define SymbolRel as R_RISCV_{32,64}
* Generate PLT header: it is used by lazy binding PLT in glibc.
* R_RISCV_CALL is changed from R_PC to R_PC_PLT. If the target symbol is preemptable, this will suppress an unnecessary "canonical PLT".
This behavior is different from ld.bfd but it is agreed the current lld behavior is favored.
I have received positive responses from the binutils maintainer that the ABI/binutils implementation can be improved, see:
https://github.com/riscv/riscv-elf-psabi-doc/issues/98
https://sourceware.org/bugzilla/show_bug.cgi?id=24685
Many -no-pie/-pie/-shared programs linked against musl or glibc should work with this patch.
Reviewed By: jrtc27
Differential Revision: https://reviews.llvm.org/D63076
llvm-svn: 364812
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions

