[PATCH] D45181: [RISCV] Add diff relocation support for RISC-V

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 12 06:27:53 PDT 2018


asb added a comment.

I think this patch and its tests would be best if based on https://reviews.llvm.org/D44886, so it can be clear which behaviour is conditional on linker relaxation being enabled.

I'd be happy for hilo-constaddr-invalid.s to always be rejected. It never worked in gas, and we can always support it for builds without linker relaxation in the future. Perhaps add a note to the test file to document that we're unconditionally rejecting for now for consistency, but that it would be easy in the future to support when linker relaxation is disabled.



================
Comment at: lib/MC/MCAssembler.cpp:685
+      // The fixup is expressable as the difference of two symbols, which the
+      // backend has indiciated can be resolved at link time. Split up the fixup
+      // into two relocations, one for the add, and one for the sub, and emit
----------------
indiciated -> indicated


Repository:
  rL LLVM

https://reviews.llvm.org/D45181





More information about the llvm-commits mailing list