aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-08-29 12:47:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-08-29 12:47:22 +0000
commit412a52955164c6b06dfc3d56264aea4652f6ec25 (patch)
tree00cbb675101bc2103e8b89790735818e011f9b25 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent96b52c5a6af38b6a72467593ace8512cbdaf1c91 (diff)
downloadllvm-412a52955164c6b06dfc3d56264aea4652f6ec25.zip
llvm-412a52955164c6b06dfc3d56264aea4652f6ec25.tar.gz
llvm-412a52955164c6b06dfc3d56264aea4652f6ec25.tar.bz2
Use the correct ctor/dtor section for dynamic-no-pic.
llvm-svn: 279967
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index fdd8dca..3bbf946 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -474,7 +474,7 @@ TargetLoweringObjectFileMachO::TargetLoweringObjectFileMachO()
void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
const TargetMachine &TM) {
TargetLoweringObjectFile::Initialize(Ctx, TM);
- if (!TM.isPositionIndependent()) {
+ if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorSection = Ctx.getMachOSection("__TEXT", "__constructor", 0,
SectionKind::getData());
StaticDtorSection = Ctx.getMachOSection("__TEXT", "__destructor", 0,