[PATCH] D87486: [ELF] Define a reportRangeError() overload for thunks and tidy up recent PPC64 thunk range errors
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 01:42:46 PDT 2020
grimar added inline comments.
================
Comment at: lld/ELF/Relocations.cpp:116
+void elf::reportRangeError(uint8_t *loc, int64_t v, int n, const Symbol &sym,
+ const Twine &msg) {
----------------
I wonder if it should be a local helper function in `Thunks.cpp`, as it does not used anywhere else?
================
Comment at: lld/ELF/Thunks.cpp:900
+ reportRangeError(buf, offset, 26, destination, "R2 save stub offset");
+ // fatal("R2 save stub branch offset is too large: " + Twine(offset));
write32(buf + 0, 0xf8410018); // std r2,24(r1)
----------------
Forgot to remove the commented line?
================
Comment at: lld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s:13
-# CHECK: error: R2 save stub branch offset is too large: -268501028
+# CHECK: error: R2 save stub offset is out of range: -268501028 is not in [-33554432, 33554431]; references callee
----------------
Perhaps add `--noinhibit-exec` case, since the logic was changed to support it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87486/new/
https://reviews.llvm.org/D87486
More information about the llvm-commits
mailing list