diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-08-29 12:47:22 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-08-29 12:47:22 +0000 |
| commit | 412a52955164c6b06dfc3d56264aea4652f6ec25 (patch) | |
| tree | 00cbb675101bc2103e8b89790735818e011f9b25 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
| parent | 96b52c5a6af38b6a72467593ace8512cbdaf1c91 (diff) | |
| download | bcm5719-llvm-412a52955164c6b06dfc3d56264aea4652f6ec25.tar.gz bcm5719-llvm-412a52955164c6b06dfc3d56264aea4652f6ec25.zip | |
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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index fdd8dca5b9f..3bbf9469a89 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, |

