diff options
Diffstat (limited to 'ELF/Target.h')
-rw-r--r-- | ELF/Target.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ELF/Target.h b/ELF/Target.h index 52c2697dc60d..e9c5f4b31ae4 100644 --- a/ELF/Target.h +++ b/ELF/Target.h @@ -45,7 +45,6 @@ public: virtual bool isTlsDynReloc(unsigned Type, const SymbolBody &S) const { return false; } - virtual unsigned getPltRefReloc(unsigned Type) const; virtual unsigned getTlsGotReloc(unsigned Type = -1) const { return TlsGotReloc; } @@ -57,8 +56,15 @@ 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 isSizeDynReloc(uint32_t Type, const SymbolBody &S) 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; virtual bool relocNeedsPlt(uint32_t Type, const SymbolBody &S) const = 0; |