[PATCH] D16880: [ELF] - Remove R_X86_64_GOTTPOFF from static relocation proccessing

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 01:47:19 PST 2016


grimar added inline comments.

================
Comment at: ELF/Target.h:29
@@ -28,3 +28,3 @@
   virtual bool isTlsDynRel(unsigned Type, const SymbolBody &S) const;
-  virtual unsigned getTlsGotRel(unsigned Type = -1) const { return TlsGotRel; }
+  virtual unsigned getTlsGotRel(unsigned Type) const { return TlsGotDynRel; }
   virtual void writeGotHeader(uint8_t *Buf) const {}
----------------
ruiu wrote:
> The other dynamic relocation for GOT is "GotRel", so we don't need to add "Dyn", no?
> 
> Also, since this is now just an accessor that does nothing, please remove this function and use the field directly.
I am already using the field directly, but there is still one place where accessor is required.
It is used directly for place (after rebase it is the only one place I think) where dynamic relocation is created. That is why I added "Dyn" to field name.
'Accessor' is still used in InputSectionBase<ELFT>::relocate() where static relocation calculation is applied, it is not an accessor though, because it returns result depending on argument for static relocation resolving.


http://reviews.llvm.org/D16880





More information about the llvm-commits mailing list