Switch from WriteEFlags to getEFlags in preparation for moving it

to Target/.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147087 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2011-12-21 20:09:46 +00:00
parent a2a98fd0dd
commit e8526d030f
2 changed files with 8 additions and 9 deletions

View File

@ -108,7 +108,7 @@ void ELFObjectWriter::WriteHeader(uint64_t SectionDataSize,
sizeof(ELF::Elf32_Ehdr))); // e_shoff = sec hdr table off in bytes
// e_flags = whatever the target wants
WriteEFlags();
Write32(getEFlags());
// e_ehsize = ELF header size
Write16(is64Bit() ? sizeof(ELF::Elf64_Ehdr) : sizeof(ELF::Elf32_Ehdr));
@ -1296,8 +1296,8 @@ ARMELFObjectWriter::~ARMELFObjectWriter()
{}
// FIXME: get the real EABI Version from the Triple.
void ARMELFObjectWriter::WriteEFlags() {
Write32(ELF::EF_ARM_EABIMASK & DefaultEABIVersion);
unsigned ARMELFObjectWriter::getEFlags() {
return ELF::EF_ARM_EABIMASK & DefaultEABIVersion;
}
// In ARM, _MergedGlobals and other most symbols get emitted directly.
@ -1646,9 +1646,8 @@ MipsELFObjectWriter::MipsELFObjectWriter(MCELFObjectTargetWriter *MOTW,
MipsELFObjectWriter::~MipsELFObjectWriter() {}
// FIXME: get the real EABI Version from the Triple.
void MipsELFObjectWriter::WriteEFlags() {
Write32(ELF::EF_MIPS_NOREORDER |
ELF::EF_MIPS_ARCH_32R2);
unsigned MipsELFObjectWriter::getEFlags() {
return ELF::EF_MIPS_NOREORDER | ELF::EF_MIPS_ARCH_32R2;
}
const MCSymbol *MipsELFObjectWriter::ExplicitRelSym(const MCAssembler &Asm,

View File

@ -244,7 +244,7 @@ class ELFObjectWriter : public MCObjectWriter {
unsigned NumberOfSections);
/// Default e_flags = 0
virtual void WriteEFlags() { Write32(0); }
virtual unsigned getEFlags() { return 0; }
virtual void WriteSymbolEntry(MCDataFragment *SymtabF,
MCDataFragment *ShndxF,
@ -369,7 +369,7 @@ class ELFObjectWriter : public MCObjectWriter {
virtual ~ARMELFObjectWriter();
virtual void WriteEFlags();
virtual unsigned getEFlags();
protected:
virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm,
const MCValue &Target,
@ -425,7 +425,7 @@ class ELFObjectWriter : public MCObjectWriter {
bool IsLittleEndian);
virtual ~MipsELFObjectWriter();
virtual void WriteEFlags();
virtual unsigned getEFlags();
protected:
virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm,