This is an archive of the discontinued LLVM Phabricator instance.

[ELF][RISCV] Add R_RISCV_PC_INDIRECT to isRelExpr()
ClosedPublic

Authored by MaskRay on Jun 10 2019, 11:58 PM.

Details

Summary

So that R_RISCV_PCREL_LO12_[IS] are considered as link-time constants in
-pie mode, otherwise there are bogus errors:

ld.lld: error: can't create dynamic relocation R_RISCV_PCREL_LO12_I against symbol: .L0  in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output

Diff Detail

Repository
rL LLVM

Event Timeline

MaskRay created this revision.Jun 10 2019, 11:58 PM
Herald added a project: Restricted Project. · View Herald Transcript
ruiu accepted this revision.Jun 11 2019, 5:27 AM

LGTM

This revision is now accepted and ready to land.Jun 11 2019, 5:27 AM
This revision was automatically updated to reflect the committed changes.