File pcc-1.0.0-fix-ctor-dtor-not-emitted.patch of Package pcc

Index: pcc-libs/csu/linux/crtbegin.c
===================================================================
RCS file: /net/pcc.ludd.ltu.se/home/cvsroot/pcc-libs/csu/linux/crtbegin.c,v
diff -u -N -r1.6 -r1.7
--- pcc-libs/csu/linux/crtbegin.c	16 Aug 2009 23:07:07 -0000	1.6
+++ pcc-libs/csu/linux/crtbegin.c	12 Apr 2011 04:44:19 -0000	1.7
@@ -40,16 +40,16 @@
 extern void (*__CTOR_LIST__[1])(void);
 extern void (*__DTOR_LIST__[1])(void);
 
-asm(	"	.section .ctors\n"
-	"	.align 2\n"
+asm(	"	.section .ctors,\"aw\",@progbits\n"
+	"	.align 4\n"
 	"__CTOR_LIST__:\n"
 #ifdef __x86_64__
 	"	.quad -1\n"
 #else
 	"	.long -1\n"
 #endif
-	"	.section .dtors\n"
-	"	.align 2\n"
+	"	.section .dtors,\"aw\",@progbits\n"
+	"	.align 4\n"
 	"__DTOR_LIST__:\n"
 #ifdef __x86_64__
 	"	.quad -1\n"
Index: pcc-libs/csu/linux/crtend.c
===================================================================
RCS file: /net/pcc.ludd.ltu.se/home/cvsroot/pcc-libs/csu/linux/crtend.c,v
diff -u -N -r1.3 -r1.4
--- pcc-libs/csu/linux/crtend.c	16 Aug 2009 23:07:07 -0000	1.3
+++ pcc-libs/csu/linux/crtend.c	12 Apr 2011 04:44:19 -0000	1.4
@@ -17,15 +17,15 @@
 
 #include "common.h"
 
-asm(	"	.section .ctors\n"
+asm(	"	.section .ctors,\"aw\",@progbits\n"
 #ifdef __x86_64__
 	"	.quad 0\n"
 #else
 	"	.long 0\n"
 #endif
 );
 
-asm(	"	.section .dtors\n"
+asm(	"	.section .dtors,\"aw\",@progbits\n"
 #ifdef __x86_64__
 	"	.quad 0\n"
 #else
openSUSE Build Service is sponsored by