[PATCH] D17265: [lld] [ELF/AArch64] Fix R_AARCH64_ABS64 in Shared mode
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 17 10:14:44 PST 2016
ruiu added inline comments.
================
Comment at: ELF/OutputSections.cpp:260-262
@@ -259,5 +259,5 @@
uintX_t VA = 0;
if (Rel.UseSymVA)
VA = Sym->getVA<ELFT>();
else if (Rel.TargetSec)
VA = Rel.TargetSec->getOffset(Rel.OffsetInTargetSec) +
----------------
Can you add {} after if and else if?
================
Comment at: ELF/OutputSections.cpp:268-269
@@ +267,4 @@
+ // local symbol represented by Rel.SymIndex.
+ auto File = Rel.OffsetSec->getFile();
+ auto LocalSym = File->getLocalSymbol(Rel.SymIndex);
+ VA = getLocalTarget(*File, *LocalSym, 0);
----------------
Please use actual types instead of auto.
================
Comment at: ELF/Target.cpp:1067-1072
@@ -1059,1 +1066,8 @@
+uint64_t PPC64TargetInfo::getDynRelativeAddend(unsigned Type,
+ uint64_t Addend) const {
+ if (Type == R_PPC64_TOC)
+ return getPPC64TocBase() + Addend;
+ return Addend;
+}
+
----------------
I skimmed through the relocation handling of PPC, but I couldn't find the location for this particular code. Can you describe it for me? (And adding a comment would be appreciated.)
Repository:
rL LLVM
http://reviews.llvm.org/D17265
More information about the llvm-commits
mailing list