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 | 0cb2a45cceaefb48ec7efb902c453aaae4e24cb2 (patch) | |
tree | 194dc5e379c84d0f1a061c47fb0dfa186dbb05b4 /include/llvm/MC/MCObjectFileInfo.h | |
parent | 80b1ae92922202c197078038c4229045cb1e295f (diff) |
Emit the ctors in the proper order on ARM/EABI.
Maybe some targets should use this as well.
Patch by Evgeniy Stepanov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCObjectFileInfo.h')
-rw-r--r-- | include/llvm/MC/MCObjectFileInfo.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/llvm/MC/MCObjectFileInfo.h b/include/llvm/MC/MCObjectFileInfo.h index 2c5a0a15c3..d91b11b1f7 100644 --- a/include/llvm/MC/MCObjectFileInfo.h +++ b/include/llvm/MC/MCObjectFileInfo.h @@ -19,10 +19,14 @@ #include "llvm/MC/SectionKind.h" namespace llvm { -class MCContext; -class MCSection; -class Triple; + class MCContext; + class MCSection; + class Triple; + namespace Structors { + enum OutputOrder { None, PriorityOrder, ReversePriorityOrder }; + } + class MCObjectFileInfo { protected: /// CommDirectiveSupportsAlignment - True if .comm supports alignment. This @@ -164,6 +168,11 @@ protected: const MCSection *PDataSection; const MCSection *XDataSection; + /// StructorOutputOrder - Whether the static ctor/dtor list should be output + /// in no particular order, in order of increasing priority or the reverse: + /// in order of decreasing priority (the default). + Structors::OutputOrder StructorOutputOrder; // Default is reverse order. + public: void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM, MCContext &ctx); @@ -291,6 +300,10 @@ public: return EHFrameSection; } + Structors::OutputOrder getStructorOutputOrder() const { + return StructorOutputOrder; + } + private: enum Environment { IsMachO, IsELF, IsCOFF }; Environment Env; |