CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
+CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
SSRC=bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S fork.S syscall.S pipe.S
SOBJS=$(patsubst %.S,%.o, $(SSRC))
$(LIBC): ar-target
-ar-target: $(OBJS) $(CRT0_OBJ)
+ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
$(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:
$(LN) -fs ../libc/sysdeps/linux/mips/sgidefs.h $(TOPDIR)/include/
# $(LN) -fs ../libc/sysdeps/linux/mips/regdef.h $(TOPDIR)/include/
--- /dev/null
+ .file 1 "initfini.c"
+ .section .mdebug.abi32
+ .previous
+ .abicalls
+#APP
+
+ .section .init
+#NO_APP
+ .align 2
+ .globl _init
+ .ent _init
+ .type _init, @function
+_init:
+ .frame $sp,32,$31 # vars= 0, regs= 2/0, args= 16, extra= 8
+ .mask 0x90000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+ .cpload $25
+ .set reorder
+ subu $sp,$sp,32
+ .cprestore 16
+ sw $31,28($sp)
+ sw $28,24($sp)
+#APP
+
+ .align 2
+ .end _init
+
+ .section .fini
+#NO_APP
+ .align 2
+ .globl _fini
+ .ent _fini
+ .type _fini, @function
+_fini:
+ .frame $sp,32,$31 # vars= 0, regs= 2/0, args= 16, extra= 8
+ .mask 0x90000000,-4
+ .fmask 0x00000000,0
+ .set noreorder
+ .cpload $25
+ .set reorder
+ subu $sp,$sp,32
+ .cprestore 16
+ sw $31,28($sp)
+ sw $28,24($sp)
+#APP
+ .align 2
+ .end _fini
+
+ .ident "GCC: (GNU) 3.3.2"