sol2.h [!USE_GLD] (CTORS_SECTION_ASM_OP): Define.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 11 Jul 2011 16:35:53 +0000 (16:35 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 11 Jul 2011 16:35:53 +0000 (16:35 +0000)
* config/i386/sol2.h [!USE_GLD] (CTORS_SECTION_ASM_OP): Define.
(DTORS_SECTION_ASM_OP): Define.

From-SVN: r176162

gcc/ChangeLog
gcc/config/i386/sol2.h

index e12c14d76df599369f26ebb49b84341bcd9cd4a1..e7b4a592b07dfdcb1969b0ab90270d60a26a64a3 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * config/i386/sol2.h [!USE_GLD] (CTORS_SECTION_ASM_OP): Define.
+       (DTORS_SECTION_ASM_OP): Define.
+
 2011-07-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * config/dfp-bit.c, config/dfp-bit.h: Move to ../libgcc.
index 5b4e3d78f584c0a57b7dfc434e80101d811a5b33..f620de5fa44ea3fb1ff50ac8cbe3cf4d97d00db2 100644 (file)
@@ -152,6 +152,13 @@ along with GCC; see the file COPYING3.  If not see
 #undef TARGET_ASM_NAMED_SECTION
 #define TARGET_ASM_NAMED_SECTION i386_solaris_elf_named_section
 
+/* Unlike GNU ld, Sun ld doesn't coalesce .ctors.N/.dtors.N sections, so
+   inhibit their creation.  Also cf. sparc/sysv4.h.  */
+#ifndef USE_GLD
+#define CTORS_SECTION_ASM_OP   "\t.section\t.ctors, \"aw\""
+#define DTORS_SECTION_ASM_OP   "\t.section\t.dtors, \"aw\""
+#endif
+
 /* We do not need NT_VERSION notes.  */
 #undef X86_FILE_START_VERSION_DIRECTIVE
 #define X86_FILE_START_VERSION_DIRECTIVE false