[PATCH] D57240: [RISCV] Don't incorrectly force relocation for %pcrel_lo

Lewis Revill via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 25 07:49:52 PST 2019


lewis-revill added a comment.

In D57240#1385541 <https://reviews.llvm.org/D57240#1385541>, @jrtc27 wrote:

> My suspicion is that it would be easier to teach `MCAssembler::evaluateFixup` how to deal with an extra level of indirection, since the problem stems from it believing the relocation can be evaluated and not knowing about the *real* symbol/relocation we care about.


I've been thinking about this and I'm wondering whether it makes sense for `shouldForceRelocation` to be able to somehow indicate 'I don't know yet'. The assembler should then keep those results instead of recording the relocation, and allow the target to make a final decision later. Or alternatively allow the target to continue to remove things from this 'don't know' list and just force relocations for all the remaining ones at the end. Either way there needs to be some separation of the pass for evaluating fixups and recording the relocations / applying the fixups.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57240/new/

https://reviews.llvm.org/D57240





More information about the llvm-commits mailing list