[PATCH] D14955: [ELF] - Lazy relocations support for x86 target.

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 24 09:34:14 PST 2015


ikudrin added a subscriber: ikudrin.

================
Comment at: ELF/Target.cpp:196
@@ +195,3 @@
+void X86TargetInfo::writeGotPltHeaderEntries(uint8_t *Buf) const {
+  write32le(Buf, Out<ELF32LE>::Dynamic->getVA());
+}
----------------
The address of the .dynamic section has to be stored at the location which is pointed to by the _GLOBAL_OFFSET_TABLE_ symbol. Although we don't use this symbol explicitly, the same effect is achieved in the method InputSectionBase<ELFT>::relocate() in the branch "if (Target->relocPointsToGot(Type))".  But in that branch, the address of .got section is used, not .got.plt's.


http://reviews.llvm.org/D14955





More information about the llvm-commits mailing list