[lld] r257140 - Add a comment.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 7 18:41:35 PST 2016


Author: ruiu
Date: Thu Jan  7 20:41:35 2016
New Revision: 257140

URL: http://llvm.org/viewvc/llvm-project?rev=257140&view=rev
Log:
Add a comment.

Modified:
    lld/trunk/ELF/Target.h

Modified: lld/trunk/ELF/Target.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=257140&r1=257139&r2=257140&view=diff
==============================================================================
--- lld/trunk/ELF/Target.h (original)
+++ lld/trunk/ELF/Target.h Thu Jan  7 20:41:35 2016
@@ -57,7 +57,14 @@ public:
   virtual void writePltEntry(uint8_t *Buf, uint64_t GotAddr,
                              uint64_t GotEntryAddr, uint64_t PltEntryAddr,
                              int32_t Index, unsigned RelOff) const = 0;
+
+  // Returns true if a relocation is relative to the place being relocated,
+  // such as relocations used for PC-relative instructions. Such relocations
+  // need not be fixed up if an image is loaded to a different address than
+  // the link-time address. So we don't have to emit a relocation for the
+  // dynamic linker if isRelRelative returns true.
   virtual bool isRelRelative(uint32_t Type) const;
+
   virtual bool isSizeReloc(uint32_t Type) const;
   virtual bool relocNeedsDynRelative(unsigned Type) const { return false; }
   virtual bool relocNeedsGot(uint32_t Type, const SymbolBody &S) const = 0;




More information about the llvm-commits mailing list