OSDN Git Service

[RISCV] Define FeatureRelax and shouldForceRelocation for RISCV linker relaxation
authorShiva Chen <shiva0217@gmail.com>
Tue, 15 May 2018 01:28:50 +0000 (01:28 +0000)
committerShiva Chen <shiva0217@gmail.com>
Tue, 15 May 2018 01:28:50 +0000 (01:28 +0000)
commit90842deba1cb8daddd6aff1b5a340b2fc36755c6
treec0a209791cb56dcf89f918fd2d8ec7a82e6a0908
parentca3e13c83831fa239a06878f068ff3de262a3869
[RISCV] Define FeatureRelax and shouldForceRelocation for RISCV linker relaxation

1. Deine FeatureRelax to enable/disable linker relaxation.

2. Define shouldForceRelocation to preserve relocation types even if the fixup
   can be resolved when linker relaxation enabled. This is necessary for
   correctness as offsets may change during relaxation.

Differential Revision: https://reviews.llvm.org/D46674

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332318 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
lib/Target/RISCV/RISCV.td
lib/Target/RISCV/RISCVSubtarget.h