diff options
-rw-r--r-- | libgloss/ChangeLog | 5 | ||||
-rw-r--r-- | libgloss/spu/Makefile.in | 8 | ||||
-rw-r--r-- | libgloss/spu/crt0.S | 6 |
3 files changed, 18 insertions, 1 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index 015afdba4..76176bd46 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,8 @@ +2008-12-11 Ken Werner <ken.werner@de.ibm.com + + * spu/crt0.S: Call __monstartup if profiling is enabled. + * spu/Makefile.in: Add gcrt1.o gcrt2.o. + 2008-12-06 Adam Nemet <anemet@caviumnetworks.com> * mips/idt32.ld: Set arch to mips:isa32r2 from mips:isa32. Update diff --git a/libgloss/spu/Makefile.in b/libgloss/spu/Makefile.in index daa1f150b..6710affcb 100644 --- a/libgloss/spu/Makefile.in +++ b/libgloss/spu/Makefile.in @@ -71,7 +71,7 @@ EVALOBJS = ${OBJS} GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \ then echo -L${objroot}/../gcc ; fi` -CRTOBJS = crti.o crtn.o crt1.o crt2.o +CRTOBJS = crti.o crtn.o crt1.o crt2.o gcrt1.o gcrt2.o OUTPUTS = libgloss.a $(CRTOBJS) NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` -ffunction-sections -fdata-sections @@ -133,6 +133,12 @@ crt1.o: $(srcdir)/crt0.S crt2.o: $(srcdir)/crt0.S $(CC) $(srcdir)/crt0.S -D_STD_MAIN -c -o crt2.o +gcrt1.o: $(srcdir)/crt0.S + $(CC) $(srcdir)/crt0.S -D_PROFILE -c -o gcrt1.o + +gcrt2.o: $(srcdir)/crt0.S + $(CC) $(srcdir)/crt0.S -D_PROFILE -D_STD_MAIN -c -o gcrt2.o + doc: clean mostlyclean: diff --git a/libgloss/spu/crt0.S b/libgloss/spu/crt0.S index 490f6f91d..39ae588c3 100644 --- a/libgloss/spu/crt0.S +++ b/libgloss/spu/crt0.S @@ -158,6 +158,12 @@ _start: ila $3, _fini brsl $LR, atexit +#ifdef _PROFILE + /* Call monstartup if profiling is enabled + */ + brsl $LR, __monstartup +#endif + ori $3,$80,0 ori $4,$81,0 #ifndef _STD_MAIN |