This is an archive of the discontinued LLVM Phabricator instance.

[ELF][RISCV] Allow R_RISCV_ADD in relocateNonAlloc()
ClosedPublic

Authored by MaskRay on Jun 13 2019, 6:14 AM.

Details

Summary

gcc may generate .debug_info/.debug_aranges/.debug_line/etc that are
relocated by R_RISCV_ADD*/R_RISCV_SUB* pairs.
Allow R_RISCV_ADD in non-SHF_ALLOC section to fix link errors like:

ld.lld: error: print.c:(.debug_frame+0x60): has non-ABS relocation R_RISCV_ADD64 against symbol '.L0 '

Diff Detail

Repository
rL LLVM

Event Timeline

MaskRay created this revision.Jun 13 2019, 6:14 AM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay added a comment.EditedJul 1 2019, 11:01 PM

🎠

I think lld' RISCV port is quite complete after this and D52165. 9.0.0 will be branched soon (July 18). The 9.0.0 release will be really helpful to collect feedback from the community :)

lld is an important component of Rust :)

ruiu added a comment.Jul 2 2019, 2:10 AM

Looks good to me. PkmX, do you have any comments?

@PkmX has been silent for a while...

@jrtc27 :)

jrtc27 added a comment.Jul 3 2019, 5:13 AM

Looks sensible to me

This revision was not accepted when it landed; it landed in state Needs Review.Jul 3 2019, 5:48 AM
This revision was automatically updated to reflect the committed changes.