mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Tidy up. 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144649 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1579,8 +1579,8 @@ unsigned PPCELFObjectWriter::GetRelocType(const MCValue &Target,
|
|||||||
return Type;
|
return Type;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void PPCELFObjectWriter::
|
||||||
PPCELFObjectWriter::adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset) {
|
adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset) {
|
||||||
switch ((unsigned)Fixup.getKind()) {
|
switch ((unsigned)Fixup.getKind()) {
|
||||||
case PPC::fixup_ppc_ha16:
|
case PPC::fixup_ppc_ha16:
|
||||||
case PPC::fixup_ppc_lo16:
|
case PPC::fixup_ppc_lo16:
|
||||||
|
@ -240,33 +240,38 @@ class ELFObjectWriter : public MCObjectWriter {
|
|||||||
F.getContents() += StringRef(buf, 8);
|
F.getContents() += StringRef(buf, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void WriteHeader(uint64_t SectionDataSize, unsigned NumberOfSections);
|
virtual void WriteHeader(uint64_t SectionDataSize,
|
||||||
|
unsigned NumberOfSections);
|
||||||
|
|
||||||
/// Default e_flags = 0
|
/// Default e_flags = 0
|
||||||
virtual void WriteEFlags() { Write32(0); }
|
virtual void WriteEFlags() { Write32(0); }
|
||||||
|
|
||||||
virtual void WriteSymbolEntry(MCDataFragment *SymtabF, MCDataFragment *ShndxF,
|
virtual void WriteSymbolEntry(MCDataFragment *SymtabF,
|
||||||
uint64_t name, uint8_t info,
|
MCDataFragment *ShndxF,
|
||||||
uint64_t value, uint64_t size,
|
uint64_t name, uint8_t info,
|
||||||
uint8_t other, uint32_t shndx,
|
uint64_t value, uint64_t size,
|
||||||
bool Reserved);
|
uint8_t other, uint32_t shndx,
|
||||||
|
bool Reserved);
|
||||||
|
|
||||||
virtual void WriteSymbol(MCDataFragment *SymtabF, MCDataFragment *ShndxF,
|
virtual void WriteSymbol(MCDataFragment *SymtabF, MCDataFragment *ShndxF,
|
||||||
ELFSymbolData &MSD,
|
ELFSymbolData &MSD,
|
||||||
const MCAsmLayout &Layout);
|
const MCAsmLayout &Layout);
|
||||||
|
|
||||||
typedef DenseMap<const MCSectionELF*, uint32_t> SectionIndexMapTy;
|
typedef DenseMap<const MCSectionELF*, uint32_t> SectionIndexMapTy;
|
||||||
virtual void WriteSymbolTable(MCDataFragment *SymtabF, MCDataFragment *ShndxF,
|
virtual void WriteSymbolTable(MCDataFragment *SymtabF,
|
||||||
const MCAssembler &Asm,
|
MCDataFragment *ShndxF,
|
||||||
const MCAsmLayout &Layout,
|
const MCAssembler &Asm,
|
||||||
const SectionIndexMapTy &SectionIndexMap);
|
const MCAsmLayout &Layout,
|
||||||
|
const SectionIndexMapTy &SectionIndexMap);
|
||||||
|
|
||||||
virtual void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,
|
virtual void RecordRelocation(const MCAssembler &Asm,
|
||||||
const MCFragment *Fragment, const MCFixup &Fixup,
|
const MCAsmLayout &Layout,
|
||||||
|
const MCFragment *Fragment,
|
||||||
|
const MCFixup &Fixup,
|
||||||
MCValue Target, uint64_t &FixedValue);
|
MCValue Target, uint64_t &FixedValue);
|
||||||
|
|
||||||
virtual uint64_t getSymbolIndexInSymbolTable(const MCAssembler &Asm,
|
virtual uint64_t getSymbolIndexInSymbolTable(const MCAssembler &Asm,
|
||||||
const MCSymbol *S);
|
const MCSymbol *S);
|
||||||
|
|
||||||
// Map from a group section to the signature symbol
|
// Map from a group section to the signature symbol
|
||||||
typedef DenseMap<const MCSectionELF*, const MCSymbol*> GroupMapTy;
|
typedef DenseMap<const MCSectionELF*, const MCSymbol*> GroupMapTy;
|
||||||
@ -347,7 +352,8 @@ class ELFObjectWriter : public MCObjectWriter {
|
|||||||
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) = 0;
|
int64_t Addend) = 0;
|
||||||
virtual void adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset) { }
|
virtual void adjustFixupOffset(const MCFixup &Fixup,
|
||||||
|
uint64_t &RelocOffset) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
//===- X86ELFObjectWriter -------------------------------------------===//
|
//===- X86ELFObjectWriter -------------------------------------------===//
|
||||||
|
@ -205,10 +205,10 @@ void MCELFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
|||||||
|
|
||||||
if (MCELF::GetBinding(SD) == ELF_STB_Local) {
|
if (MCELF::GetBinding(SD) == ELF_STB_Local) {
|
||||||
const MCSection *Section = getAssembler().getContext().getELFSection(".bss",
|
const MCSection *Section = getAssembler().getContext().getELFSection(".bss",
|
||||||
ELF::SHT_NOBITS,
|
ELF::SHT_NOBITS,
|
||||||
ELF::SHF_WRITE |
|
ELF::SHF_WRITE |
|
||||||
ELF::SHF_ALLOC,
|
ELF::SHF_ALLOC,
|
||||||
SectionKind::getBSS());
|
SectionKind::getBSS());
|
||||||
Symbol->setSection(*Section);
|
Symbol->setSection(*Section);
|
||||||
|
|
||||||
struct LocalCommon L = {&SD, Size, ByteAlignment};
|
struct LocalCommon L = {&SD, Size, ByteAlignment};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//===- lib/MC/MCModule.cpp - MCModule implementation --------------------------===//
|
//===- lib/MC/MCModule.cpp - MCModule implementation ----------------------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
|
@ -56,8 +56,8 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
|
|||||||
|
|
||||||
TLSThreadInitSection
|
TLSThreadInitSection
|
||||||
= Ctx->getMachOSection("__DATA", "__thread_init",
|
= Ctx->getMachOSection("__DATA", "__thread_init",
|
||||||
MCSectionMachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS,
|
MCSectionMachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS,
|
||||||
SectionKind::getDataRel());
|
SectionKind::getDataRel());
|
||||||
|
|
||||||
CStringSection // .cstring
|
CStringSection // .cstring
|
||||||
= Ctx->getMachOSection("__TEXT", "__cstring",
|
= Ctx->getMachOSection("__TEXT", "__cstring",
|
||||||
@ -221,8 +221,8 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
|
|||||||
void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
|
void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
|
||||||
if (T.getArch() == Triple::x86) {
|
if (T.getArch() == Triple::x86) {
|
||||||
PersonalityEncoding = (RelocM == Reloc::PIC_)
|
PersonalityEncoding = (RelocM == Reloc::PIC_)
|
||||||
? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
|
? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
|
||||||
: dwarf::DW_EH_PE_absptr;
|
: dwarf::DW_EH_PE_absptr;
|
||||||
LSDAEncoding = (RelocM == Reloc::PIC_)
|
LSDAEncoding = (RelocM == Reloc::PIC_)
|
||||||
? dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
|
? dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
|
||||||
: dwarf::DW_EH_PE_absptr;
|
: dwarf::DW_EH_PE_absptr;
|
||||||
@ -230,8 +230,8 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
|
|||||||
? dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
|
? dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
|
||||||
: dwarf::DW_EH_PE_absptr;
|
: dwarf::DW_EH_PE_absptr;
|
||||||
TTypeEncoding = (RelocM == Reloc::PIC_)
|
TTypeEncoding = (RelocM == Reloc::PIC_)
|
||||||
? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
|
? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
|
||||||
: dwarf::DW_EH_PE_absptr;
|
: dwarf::DW_EH_PE_absptr;
|
||||||
} else if (T.getArch() == Triple::x86_64) {
|
} else if (T.getArch() == Triple::x86_64) {
|
||||||
FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
|
FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user