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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 27 01:34:44 PST 2018


grimar added inline comments.


================
Comment at: ELF/InputSection.cpp:900
+// pair in the case that relaxation is valid.
+static llvm::Optional<PPC64RelaxTo> relaxToPPC64(Relocation Rel) {
+  // If the symbol the relocation refers to is not the .toc section
----------------
Seems the intention was to name it 'relaxTocPPC64'?


================
Comment at: ELF/InputSection.cpp:911
+
+  auto *TocISB = dyn_cast<InputSectionBase>(DefSym->Section);
+  // Get the symbol + addend that the toc-indirection refers to.
----------------
`dyn_cast` -> `cast` as null return value is not expected here.


================
Comment at: ELF/InputSection.cpp:930
+      getRelocTargetVA(File, Type, /* Addend */ RelaxTo.second, AddrLoc,
+                       /* Defined* */ *RelaxTo.first, Expr),
+      Config->Wordsize * 8);
----------------
Defined* -> Defined


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