diff options
author | Roman Divacky <rdivacky@freebsd.org> | 2011-08-04 19:08:19 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@freebsd.org> | 2011-08-04 19:08:19 +0000 |
commit | 2a66cea1b82b82c7bf19e232aed741331377ad30 (patch) | |
tree | 885148ba415132590c98487130e5d86865c623c4 /lib/MC/ELFObjectWriter.h | |
parent | ad90d3a343ca73c32693e2b05b74462ccd9659cd (diff) |
Introduce adjustFixupOffset that adjusts the fixup offset of a relocation.
This is meant to be overriden by backends. Implement an override on PowerPC
which adjusts the offset by 2 for ha16/lo16 relocation kinds. This removes
a commented out hack and enables hello world to be compiled on PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/ELFObjectWriter.h')
-rw-r--r-- | lib/MC/ELFObjectWriter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MC/ELFObjectWriter.h b/lib/MC/ELFObjectWriter.h index 45a88985c4..d657d131bd 100644 --- a/lib/MC/ELFObjectWriter.h +++ b/lib/MC/ELFObjectWriter.h @@ -347,6 +347,7 @@ class ELFObjectWriter : public MCObjectWriter { virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel, bool IsRelocWithSymbol, int64_t Addend) = 0; + virtual void adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset) { } }; //===- X86ELFObjectWriter -------------------------------------------===// @@ -408,6 +409,7 @@ class ELFObjectWriter : public MCObjectWriter { virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup, bool IsPCRel, bool IsRelocWithSymbol, int64_t Addend); + virtual void adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset); }; //===- MBlazeELFObjectWriter -------------------------------------------===// |