This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Always emit a symbol for R_RISCV_PCREL_LO12_I.
Needs ReviewPublic

Authored by Bigcheese on Feb 10 2018, 3:20 AM.

Details

Reviewers
ahmedcharles
asb
Summary

riscv-ld mislinks if a section relative symbol is used instead.

I've reported this as a bug
(https://github.com/riscv/riscv-binutils-gdb/issues/138), but it may be
defined as requiring a symbol.

Depends on: https://reviews.llvm.org/D43157

Diff Detail

Event Timeline

Bigcheese created this revision.Feb 10 2018, 3:20 AM
asb added a comment.EditedMar 14 2018, 10:24 AM

Thanks for pursuing this issue on the binutils bug tracker. Might you be interested in proposing a patch to the psabi doc that clarifies the requirement here? It seems that the main reason for forcing this behaviour is for linker relaxation - I hope we can co-ordinate with binutils to allow addends when linker relaxation is disabled.

https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md