mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Explicit symbols for gnu mimicing relocations. Patch by Jack Carter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145911 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2bcc789a9d
commit
a00a62acd0
@ -1831,6 +1831,20 @@ void MipsELFObjectWriter::WriteEFlags() {
|
|||||||
ELF::EF_MIPS_ARCH_32R2);
|
ELF::EF_MIPS_ARCH_32R2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const MCSymbol *MipsELFObjectWriter::ExplicitRelSym(const MCAssembler &Asm,
|
||||||
|
const MCValue &Target,
|
||||||
|
const MCFragment &F,
|
||||||
|
const MCFixup &Fixup,
|
||||||
|
bool IsPCRel) const {
|
||||||
|
assert(Target.getSymA() && "SymA cannot be 0.");
|
||||||
|
const MCSymbol &Sym = Target.getSymA()->getSymbol();
|
||||||
|
|
||||||
|
if (Sym.getSection().getKind().isMergeable1ByteCString())
|
||||||
|
return &Sym;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target,
|
unsigned MipsELFObjectWriter::GetRelocType(const MCValue &Target,
|
||||||
const MCFixup &Fixup,
|
const MCFixup &Fixup,
|
||||||
bool IsPCRel,
|
bool IsPCRel,
|
||||||
|
@ -445,6 +445,12 @@ class ELFObjectWriter : public MCObjectWriter {
|
|||||||
virtual void WriteEFlags();
|
virtual void WriteEFlags();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm,
|
||||||
|
const MCValue &Target,
|
||||||
|
const MCFragment &F,
|
||||||
|
const MCFixup &Fixup,
|
||||||
|
bool IsPCRel) const;
|
||||||
|
|
||||||
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
|
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
|
||||||
bool IsPCRel, bool IsRelocWithSymbol,
|
bool IsPCRel, bool IsRelocWithSymbol,
|
||||||
int64_t Addend);
|
int64_t Addend);
|
||||||
|
Loading…
Reference in New Issue
Block a user