Add R_RISCV_RELAX relocation to all possible relax candidates and corresponding testcase.
Details
Diff Detail
Event Timeline
Changes:
- Rebase.
- Change fixup value of R_RISCV_RELAX to a constant 0 value for consistent with binutils's implementation.
lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | ||
---|---|---|
198 | It would make most sense to declare and initialise this alongside Expr/Kind/FixupKind, seeing as like those RelaxCandidate is relevant only for immediates. | |
266–267 | Suggest a comment here, something like: | |
test/MC/RISCV/linker-relaxation.s | ||
27 | Check you add a check that R_RISCV_RELAX is not generated when -mattr=-relax is used? |
I think we've landed enough pre-requisites that this this is good to go in, but it introduces failures to option-pushpop.s and option-relax.s. Can you take a look please?
Changes:
- Update testcase, R_RISCV_RELAX won't bind with symbol to fit binutils's behavior.
It would make most sense to declare and initialise this alongside Expr/Kind/FixupKind, seeing as like those RelaxCandidate is relevant only for immediates.