[PATCH] D54720: [PPC64] toc-indirect to toc-relative relaxation.

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 3 12:14:12 PST 2019


sfertile marked an inline comment as done.
sfertile added inline comments.


================
Comment at: ELF/Arch/PPC64.cpp:110
+  if (Index >= Relas.size()) {
+    warn("invalid offset " + Twine(Offset) + " into the .toc section in " +
+         toString(TocSec->File));
----------------
ruiu wrote:
> Isn't this an error?
Ideally it would be, however I found a gcc bug where it emits a toc entry without a corresponding relocation. This causes the look ups for any relocations after the skipped one to fail.  I am still trying to cut the problem down to something smaller so I can understand it better (and open a bug report to get it fixed), but it seems that the rest of the codegen is valid (ie nothing tries to read or write to the toc entry missing the relocation). I don't think the problem is prevalent enough to warrant changing to a slower scan of the relocations in the case we do find a mismatch, and because the rest of the codegen is 'good' I don't think we should emit an error either.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D54720





More information about the llvm-commits mailing list