[PATCH] D18119: [ELF][MIPS] Factor out SumVA adjustments into a couple of separate functions. NFC.

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 13 01:37:26 PST 2016


atanasyan added a comment.

Thanks for review.

The oddity of MIPS ABI is obvious to everybody. Probably the ABI will be changed gradually or by release completely new ABI but anyway it is a long process.


================
Comment at: ELF/InputSection.cpp:219
@@ +218,3 @@
+  return Body.getGotVA<ELFT>();
+}
+
----------------
grimar wrote:
> Is that correct ? Originally addend was added:
> 
> ```
>  SymVA = Out<ELFT>::Got->getMipsLocalFullAddr(Body) + A;
>  }
> }
> else {
>  SymVA = Body.getGotVA<ELFT>() + A;
> ```
It is correct for 32-bit MIPS because in that case we use REL format and have to extract addend from the buffer insider the `relocateOne` routine. The `A` is always zero. But I will return `+ A` expressions before commit the patch to escape unnecessary changes.


Repository:
  rL LLVM

http://reviews.llvm.org/D18119





More information about the llvm-commits mailing list