diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2011-12-03 23:49:37 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2011-12-03 23:49:37 +0000 |
commit | 965e0c6de25ff985c56563fba5ccf7c937fda132 (patch) | |
tree | a2cd699fd668f569034a1d6f2db54145fe989593 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 6dae604f500124b91a3aad255b467a84c43ede6b (diff) | |
download | llvm-965e0c6de25ff985c56563fba5ccf7c937fda132.zip llvm-965e0c6de25ff985c56563fba5ccf7c937fda132.tar.gz llvm-965e0c6de25ff985c56563fba5ccf7c937fda132.tar.bz2 |
Emit the ctors in the proper order on ARM/EABI.
Maybe some targets should use this as well.
Patch by Evgeniy Stepanov!
llvm-svn: 145781
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 7d23541..32ba924 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -31,6 +31,8 @@ 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, @@ -258,6 +260,8 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { } } + StructorOutputOrder = Structors::ReversePriorityOrder; + // ELF BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS, @@ -385,6 +389,8 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) { // COFF + StructorOutputOrder = Structors::ReversePriorityOrder; + TextSection = Ctx->getCOFFSection(".text", COFF::IMAGE_SCN_CNT_CODE | |