[llvm-commits] CVS: llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp

Lauro Ramos Venancio lauro.venancio at gmail.com
Mon Mar 5 10:00:15 PST 2007



Changes in directory llvm/lib/Target/ARM:

ARMTargetAsmInfo.cpp updated: 1.11 -> 1.12
---
Log message:

Use init_array/fini_array sections for static contructors/destructors when the ABI is AAPCS.
Fix SingleSource/Regression/C/ConstructorDestructorAttributes test on arm-linux-gnueabi.



---
Diffs of the changes:  (+7 -2)

 ARMTargetAsmInfo.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp
diff -u llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.11 llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.12
--- llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:1.11	Thu Feb  1 15:43:53 2007
+++ llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp	Mon Mar  5 11:59:58 2007
@@ -58,8 +58,13 @@
   } 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";






More information about the llvm-commits mailing list