diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp b/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp index d567cc14a830..5dd7a865c575 100644 --- a/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/contrib/llvm-project/llvm/lib/MC/MCObjectFileInfo.cpp @@ -28,7 +28,7 @@ static bool useCompactUnwind(const Triple &T) { return false; // aarch64 always has it. - if (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32) + if (T.getArch() == Triple::aarch64) return true; // armv7k always has it. @@ -40,7 +40,8 @@ static bool useCompactUnwind(const Triple &T) { return true; // And the iOS simulator. - if (T.isiOS() && T.isX86()) + if (T.isiOS() && + (T.getArch() == Triple::x86_64 || T.getArch() == Triple::x86)) return true; return false; @@ -56,8 +57,7 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) { MachO::S_ATTR_STRIP_STATIC_SYMS | MachO::S_ATTR_LIVE_SUPPORT, SectionKind::getReadOnly()); - if (T.isOSDarwin() && - (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32)) + if (T.isOSDarwin() && T.getArch() == Triple::aarch64) SupportsCompactUnwindWithoutEHFrame = true; if (T.isWatchABI()) @@ -191,9 +191,9 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) { Ctx->getMachOSection("__LD", "__compact_unwind", MachO::S_ATTR_DEBUG, SectionKind::getReadOnly()); - if (T.isX86()) + if (T.getArch() == Triple::x86_64 || T.getArch() == Triple::x86) CompactUnwindDwarfEHFrameOnly = 0x04000000; // UNWIND_X86_64_MODE_DWARF - else if (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32) + else if (T.getArch() == Triple::aarch64) CompactUnwindDwarfEHFrameOnly = 0x03000000; // UNWIND_ARM64_MODE_DWARF else if (T.getArch() == Triple::arm || T.getArch() == Triple::thumb) CompactUnwindDwarfEHFrameOnly = 0x04000000; // UNWIND_ARM_MODE_DWARF @@ -467,11 +467,6 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) { DebugSecType, ELF::SHF_EXCLUDE); DwarfRnglistsDWOSection = Ctx->getELFSection(".debug_rnglists.dwo", DebugSecType, ELF::SHF_EXCLUDE); - DwarfMacinfoDWOSection = - Ctx->getELFSection(".debug_macinfo.dwo", DebugSecType, ELF::SHF_EXCLUDE); - - DwarfLoclistsDWOSection = - Ctx->getELFSection(".debug_loclists.dwo", DebugSecType, ELF::SHF_EXCLUDE); // DWP Sections DwarfCUIndexSection = @@ -489,6 +484,9 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) { Ctx->getELFSection(".eh_frame", EHSectionType, EHSectionFlags); StackSizesSection = Ctx->getELFSection(".stack_sizes", ELF::SHT_PROGBITS, 0); + + RemarksSection = + Ctx->getELFSection(".remarks", ELF::SHT_PROGBITS, ELF::SHF_EXCLUDE); } void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) { @@ -625,11 +623,6 @@ void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) { COFF::IMAGE_SCN_MEM_DISCARDABLE | COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | COFF::IMAGE_SCN_MEM_READ, SectionKind::getMetadata(), "debug_macinfo"); - DwarfMacinfoDWOSection = Ctx->getCOFFSection( - ".debug_macinfo.dwo", - COFF::IMAGE_SCN_MEM_DISCARDABLE | COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | - COFF::IMAGE_SCN_MEM_READ, - SectionKind::getMetadata(), "debug_macinfo.dwo"); DwarfInfoDWOSection = Ctx->getCOFFSection( ".debug_info.dwo", COFF::IMAGE_SCN_MEM_DISCARDABLE | COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | @@ -726,11 +719,6 @@ void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) { COFF::IMAGE_SCN_MEM_READ, SectionKind::getMetadata()); - GLJMPSection = Ctx->getCOFFSection(".gljmp$y", - COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | - COFF::IMAGE_SCN_MEM_READ, - SectionKind::getMetadata()); - TLSDataSection = Ctx->getCOFFSection( ".tls$", COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | COFF::IMAGE_SCN_MEM_READ | COFF::IMAGE_SCN_MEM_WRITE, @@ -785,16 +773,7 @@ void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) { // the ABI or object file format. For example, the XL compiler uses an unnamed // csect for program code. TextSection = Ctx->getXCOFFSection( - ".text", XCOFF::StorageMappingClass::XMC_PR, XCOFF::XTY_SD, - XCOFF::C_HIDEXT, SectionKind::getText()); - - DataSection = Ctx->getXCOFFSection( - ".data", XCOFF::StorageMappingClass::XMC_RW, XCOFF::XTY_SD, - XCOFF::C_HIDEXT, SectionKind::getData()); - - ReadOnlySection = Ctx->getXCOFFSection( - ".rodata", XCOFF::StorageMappingClass::XMC_RO, XCOFF::XTY_SD, - XCOFF::C_HIDEXT, SectionKind::getReadOnly()); + ".text", XCOFF::StorageMappingClass::XMC_PR, SectionKind::getText()); } void MCObjectFileInfo::InitMCObjectFileInfo(const Triple &TheTriple, bool PIC, |
