[PATCH] D18083: [ELF] - Refactor of InputSectionBase<ELFT>::relocate()

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 06:27:39 PST 2016


atanasyan added inline comments.

================
Comment at: ELF/InputSection.cpp:186
@@ +185,3 @@
+    // the relocation's result for local symbol: S + A + GP0 - G.
+    SymVA += File->getMipsGp0();
+    return nullptr;
----------------
grimar wrote:
> atanasyan wrote:
> > It is rather unexpected that function named `getLocalPaired` under some conditions do not find the pair but still change SymVA for relocations that never have pairs.
> That is something I don't like in it's name. But it returns something that is used as pair.
> I dont have better suggestion for it's name currently.
I have an idea how to put all code unrelated to paired relocation to something like `adjustMipsSymVA` and allow `getLocalPaired` to handle only "paired" relocations. I can provide a patch tomorrow.



http://reviews.llvm.org/D18083





More information about the llvm-commits mailing list