From 4a99f59aef358fb93eac180e49f6dcef03822046 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Wed, 25 Jan 2012 22:24:19 +0000 Subject: Properly emit ctors / dtors with priorities into desired sections and let linker handle the rest. This finally fixes PR5329 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148990 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCObjectFileInfo.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/MC/MCObjectFileInfo.cpp') diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index 32ba92424b..4c03aaa873 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -31,8 +31,6 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) { if (T.isMacOSX() && T.isMacOSXVersionLT(10, 5)) CommDirectiveSupportsAlignment = false; - StructorOutputOrder = Structors::PriorityOrder; - TextSection // .text = Ctx->getMachOSection("__TEXT", "__text", MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, @@ -260,12 +258,10 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { } } - StructorOutputOrder = Structors::ReversePriorityOrder; - // ELF BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS, - ELF::SHF_WRITE |ELF::SHF_ALLOC, + ELF::SHF_WRITE | ELF::SHF_ALLOC, SectionKind::getBSS()); TextSection = @@ -389,8 +385,6 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) { // COFF - StructorOutputOrder = Structors::ReversePriorityOrder; - TextSection = Ctx->getCOFFSection(".text", COFF::IMAGE_SCN_CNT_CODE | -- cgit v1.2.3-18-g5258