diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2012-01-25 22:24:19 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2012-01-25 22:24:19 +0000 |
commit | 7722a2d4e33da6f5b0569241328a26ba78c2836b (patch) | |
tree | 55d3f9476812c0592a8ae2f944409874181f0922 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | f7f102f81a6516ea0e47370959a388eaa5f16c3c (diff) | |
download | llvm-7722a2d4e33da6f5b0569241328a26ba78c2836b.zip llvm-7722a2d4e33da6f5b0569241328a26ba78c2836b.tar.gz llvm-7722a2d4e33da6f5b0569241328a26ba78c2836b.tar.bz2 |
Properly emit ctors / dtors with priorities into desired sections
and let linker handle the rest.
This finally fixes PR5329
llvm-svn: 148990
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 32ba924..4c03aaa 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/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 | |