mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
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
This commit is contained in:
@@ -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 -------------------------------------------===//
|
||||
|
Reference in New Issue
Block a user