diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:06:04 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-13 20:06:04 +0000 |
commit | b289257c7f3ed78b7d3971c596d7c60a9050c705 (patch) | |
tree | d6b57e29a5a86347a020d6f0cae76cc2d0f3bf8d /ELF/Target.h | |
parent | fba2c04f31e119eacf142fcbbaabd5a9e63a39ed (diff) | |
download | src-b289257c7f3ed78b7d3971c596d7c60a9050c705.tar.gz src-b289257c7f3ed78b7d3971c596d7c60a9050c705.zip |
Vendor import of lld trunk r257626:vendor/lld/lld-trunk-r257626
Notes
Notes:
svn path=/vendor/lld/dist/; revision=293846
svn path=/vendor/lld/lld-trunk-r257626/; revision=293847; tag=vendor/lld/lld-trunk-r257626
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; |