| Index: src/IceTargetLoweringMIPS32.cpp
|
| diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
|
| index 995711298a6e669acd79690dce819fab1deff371..310e0516aa94e8c47e2db206b76c4a85cf9c5873 100644
|
| --- a/src/IceTargetLoweringMIPS32.cpp
|
| +++ b/src/IceTargetLoweringMIPS32.cpp
|
| @@ -4982,6 +4982,23 @@ void ConstantUndef::emit(GlobalContext *) const {
|
| TargetDataMIPS32::TargetDataMIPS32(GlobalContext *Ctx)
|
| : TargetDataLowering(Ctx) {}
|
|
|
| +// Generate .MIPS.abiflags section. This section contains a versioned data
|
| +// structure with essential information required for loader to determine the
|
| +// requirements of the application.
|
| +void TargetDataMIPS32::emitTargetRODataSections() {
|
| + struct MipsABIFlagsSection Flags;
|
| + Flags.setAbiFlags();
|
| + ELFObjectWriter *Writer = Ctx->getObjectWriter();
|
| + const std::string Name = ".MIPS.abiflags";
|
| + const llvm::ELF::Elf64_Word ShType = llvm::ELF::SHT_MIPS_ABIFLAGS;
|
| + const llvm::ELF::Elf64_Xword ShFlags = llvm::ELF::SHF_ALLOC;
|
| + const llvm::ELF::Elf64_Xword ShAddralign = 8;
|
| + const llvm::ELF::Elf64_Xword ShEntsize = sizeof(Flags);
|
| + Writer->writeTargetRODataSection(
|
| + Name, ShType, ShFlags, ShAddralign, ShEntsize,
|
| + llvm::StringRef(reinterpret_cast<const char *>(&Flags), sizeof(Flags)));
|
| +}
|
| +
|
| void TargetDataMIPS32::lowerGlobals(const VariableDeclarationList &Vars,
|
| const std::string &SectionSuffix) {
|
| const bool IsPIC = getFlags().getUseNonsfi();
|
|
|