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 | 4a99f59aef358fb93eac180e49f6dcef03822046 (patch) | |
tree | f0f951466aaec123a732b8af2ce20960d12f88b6 /include/llvm/Target | |
parent | 58a3685916e2badd7fdec557641b056c1540c0c3 (diff) | |
download | external_llvm-4a99f59aef358fb93eac180e49f6dcef03822046.zip external_llvm-4a99f59aef358fb93eac180e49f6dcef03822046.tar.gz external_llvm-4a99f59aef358fb93eac180e49f6dcef03822046.tar.bz2 |
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
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/TargetLoweringObjectFile.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h index 7d06cec..04fe220 100644 --- a/include/llvm/Target/TargetLoweringObjectFile.h +++ b/include/llvm/Target/TargetLoweringObjectFile.h @@ -121,7 +121,18 @@ public: const MCExpr * getExprForDwarfReference(const MCSymbol *Sym, unsigned Encoding, MCStreamer &Streamer) const; - + + virtual const MCSection * + getStaticCtorSection(unsigned Priority = 65535) const { + (void)Priority; + return StaticCtorSection; + } + virtual const MCSection * + getStaticDtorSection(unsigned Priority = 65535) const { + (void)Priority; + return StaticDtorSection; + } + protected: virtual const MCSection * SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, |