diff options
Diffstat (limited to 'lib/Target/ARM/ARMTargetAsmInfo.cpp')
-rw-r--r-- | lib/Target/ARM/ARMTargetAsmInfo.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.cpp b/lib/Target/ARM/ARMTargetAsmInfo.cpp index f896eb724c..56da6d9f05 100644 --- a/lib/Target/ARM/ARMTargetAsmInfo.cpp +++ b/lib/Target/ARM/ARMTargetAsmInfo.cpp @@ -28,8 +28,13 @@ ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) { JumpTableDataSection = ".const"; CStringSection = "\t.cstring"; HasDotTypeDotSizeDirective = false; - StaticCtorsSection = ".mod_init_func"; - StaticDtorsSection = ".mod_term_func"; + if (TM.getRelocationModel() == Reloc::Static) { + StaticCtorsSection = ".constructor"; + StaticDtorsSection = ".destructor"; + } else { + StaticCtorsSection = ".mod_init_func"; + StaticDtorsSection = ".mod_term_func"; + } // In non-PIC modes, emit a special label before jump tables so that the // linker can perform more accurate dead code stripping. |