diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp b/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp index b4948c5b5b5..ff6de2eee40 100644 --- a/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp +++ b/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp @@ -58,8 +58,13 @@ ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) { } else { PrivateGlobalPrefix = ".L"; WeakRefDirective = "\t.weak\t"; - StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits"; - StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits"; + if (Subtarget->isAAPCS_ABI()) { + StaticCtorsSection = "\t.section .init_array,\"aw\",%init_array"; + StaticDtorsSection = "\t.section .fini_array,\"aw\",%fini_array"; + } else { + StaticCtorsSection = "\t.section .ctors,\"aw\",%progbits"; + StaticDtorsSection = "\t.section .dtors,\"aw\",%progbits"; + } } ZeroDirective = "\t.space\t"; |