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 | dfbecd1eb7602c509fb906d486c042600ac2a249 (patch) | |
| tree | 347a50606e8b96fd9c97512e6d2d60c1ae3fb7a3 /llvm/lib/MC/ELFObjectWriter.h | |
| parent | fddf530c5d42712643281f2a9032aa00d8fda081 (diff) | |
| download | bcm5719-llvm-dfbecd1eb7602c509fb906d486c042600ac2a249.tar.gz bcm5719-llvm-dfbecd1eb7602c509fb906d486c042600ac2a249.zip | |
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.
llvm-svn: 136905
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.h')
| -rw-r--r-- | llvm/lib/MC/ELFObjectWriter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.h b/llvm/lib/MC/ELFObjectWriter.h index 45a88985c4b..d657d131bd3 100644 --- a/llvm/lib/MC/ELFObjectWriter.h +++ b/llvm/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 -------------------------------------------===// |

