[RISCV] Don't force absolute FK_Data_X fixups to relocs
authorAlex Bradbury <asb@lowrisc.org>
Mon, 19 Aug 2019 13:23:02 +0000 (13:23 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Mon, 19 Aug 2019 13:23:02 +0000 (13:23 +0000)
commit1c1f8f215d89f1946ec4942c0d4ce8d4bd4f33f3
treedca263db46939350a48e0bc31f8791352ad2f999
parent88df53e6eaf355271e90fa928df53ab6ea244a69
[RISCV] Don't force absolute FK_Data_X fixups to relocs

The current behavior of shouldForceRelocation forces relocations for the
majority of fixups when relaxation is enabled. This makes sense for
fixups which incorporate symbols but is unnecessary for simple data
fixups where the fixup target is already resolved to an absolute value.

Differential Revision: https://reviews.llvm.org/D63404
Patch by Edward Jones.

llvm-svn: 369257
llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
llvm/test/MC/RISCV/fde-reloc.s
llvm/test/MC/RISCV/linker-relaxation.s