Update of /cvsroot/linux-vax/uClibc/libc/sysdeps/linux/vax
In directory sc8-pr-cvs1:/tmp/cvs-serv23877
Modified Files:
Makefile crt0.S
Added Files:
crti.S crtn.S
Log Message:
DA: move to crti/crtn separate files and change Makefile accordingly
--- NEW FILE: crti.S ---
.file "initfini.c"
.version "01.01"
gcc2_compiled.:
__gnu_compiled_c:
#APP
.section .init
#NO_APP
.align 1
.globl _init
.type _init,@function
_init:
.word 0x0
#APP
.align 1
.section .fini
#NO_APP
.align 1
.globl _fini
.type _fini,@function
_fini:
.word 0x0
#APP
.align 1
.ident "GCC: (GNU) 2.95.2 19991024 (release) (Linux/VAX CVS)"
--- NEW FILE: crtn.S ---
.file "initfini.c"
.version "01.01"
gcc2_compiled.:
__gnu_compiled_c:
#APP
.section .init
#NO_APP
.align 1
.globl _init
.type _init,@function
#NO_APP
ret
.Lfe2:
.size _init,.Lfe2-_init
#APP
.section .fini
#NO_APP
.align 1
.globl _fini
.type _fini,@function
#NO_APP
ret
.Lfe3:
.size _fini,.Lfe3-_fini
#APP
.ident "GCC: (GNU) 2.95.2 19991024 (release) (Linux/VAX CVS)"
Index: Makefile
===================================================================
RCS file: /cvsroot/linux-vax/uClibc/libc/sysdeps/linux/vax/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Makefile 9 Sep 2003 11:46:03 -0000 1.7
+++ Makefile 30 Nov 2003 22:53:31 -0000 1.8
@@ -26,6 +26,9 @@
CRT0_SRC=crt0.S
CRT0_OBJ=crt0.o crt1.o
+CRT0_DEPS=
+#gmon-start.S
+CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
#SSRC=longjmp.S setjmp.S vfork.S
SSRC=__longjmp.S setjmp.S _setjmp.S clone.S
@@ -43,7 +46,7 @@
$(LIBC): ar-target
-ar-target: $(OBJS) $(CRT0_OBJ)
+ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
cp $(CRT0_OBJ) $(TOPDIR)lib
@@ -58,6 +61,29 @@
$(COBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
+
+ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
+crti.o: crti.S
+ $(CC) $(SAFECFLAGS) -c crti.S -o crti.o
+
+$(TOPDIR)lib/crti.o: crti.o
+ $(INSTALL) -d $(TOPDIR)lib/
+ cp crti.o $(TOPDIR)lib/
+
+crtn.o: crtn.S
+ $(CC) $(SAFECFLAGS) -c crtn.S -o crtn.o
+
+$(TOPDIR)lib/crtn.o: crtn.o
+ $(INSTALL) -d $(TOPDIR)lib/
+ cp crtn.o $(TOPDIR)lib/
+else
+$(TOPDIR)lib/crti.o:
+ $(INSTALL) -d $(TOPDIR)lib/
+ $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
+$(TOPDIR)lib/crtn.o:
+ $(INSTALL) -d $(TOPDIR)lib/
+ $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+endif
headers:
Index: crt0.S
===================================================================
RCS file: /cvsroot/linux-vax/uClibc/libc/sysdeps/linux/vax/crt0.S,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- crt0.S 17 Feb 2003 22:54:40 -0000 1.3
+++ crt0.S 30 Nov 2003 22:53:31 -0000 1.4
@@ -33,7 +33,7 @@
addl3 %r3, %r0, %r2
/* */
-#if defined L_crt1 && defined __UCLIBC_CTOR_DTOR__
+#if (defined L_crt1 || defined L_gcrt1) && defined __UCLIBC_CTOR_DTOR__
/* Push .init and .fini arguments to __uClibc_start_main() on the stack */
pushl $_fini
pushl $_init
|