diff options
Diffstat (limited to 'libc/sysdeps/linux/arm')
-rw-r--r-- | libc/sysdeps/linux/arm/Makefile | 7 | ||||
-rw-r--r-- | libc/sysdeps/linux/arm/crt0.S | 10 |
2 files changed, 2 insertions, 15 deletions
diff --git a/libc/sysdeps/linux/arm/Makefile b/libc/sysdeps/linux/arm/Makefile index 1a11e43ef..ca41ff6e7 100644 --- a/libc/sysdeps/linux/arm/Makefile +++ b/libc/sysdeps/linux/arm/Makefile @@ -20,7 +20,7 @@ TOPDIR=../../../../ include $(TOPDIR)Rules.mak CRT0_SRC = crt0.S -CRT0_OBJ = crt0.o crt1.o +CRT0_OBJ = crt1.o SCRT0_OBJ = $(patsubst %,S%, $(CRT0_OBJ)) CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o @@ -41,11 +41,6 @@ $(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) $(INSTALL) -d $(TOPDIR)lib/ cp $(CRT0_OBJ) $(SCRT0_OBJ) $(TOPDIR)lib/ -ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) - $(RM) $(TOPDIR)lib/Scrt0.o -else - mv $(TOPDIR)lib/Scrt0.o $(TOPDIR)lib/Scrt1.o -endif $(CRT0_OBJ): $(CRT0_SRC) $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o diff --git a/libc/sysdeps/linux/arm/crt0.S b/libc/sysdeps/linux/arm/crt0.S index f58885d17..4f4a8cefd 100644 --- a/libc/sysdeps/linux/arm/crt0.S +++ b/libc/sysdeps/linux/arm/crt0.S @@ -51,13 +51,9 @@ ARM register quick reference: .text .global _start .type _start,%function -#if defined L_crt0 || ! defined __UCLIBC_CTOR_DTOR__ - .type __uClibc_main,%function -#else .weak _init .weak _fini .type __uClibc_start_main,%function -#endif /* Stick in a dummy reference to main(), so that if an application * is linking when the main() function is in a static library (.a) * we can be sure that main() actually gets linked in */ @@ -92,7 +88,6 @@ _start: ldr r2,[sp, #8] #endif -#if (defined L_crt1 ) && defined __UCLIBC_CTOR_DTOR__ #ifdef __PIC__ /* Store the address of _init in r3 as an argument to main() */ adr r5, .L_init @@ -113,14 +108,11 @@ _start: /* Ok, now run uClibc's main() -- shouldn't return */ bl __uClibc_start_main -#else - bl __uClibc_main -#endif /* Crash if somehow `exit' returns anyways. */ bl abort -#if (defined L_crt1 ) && defined __UCLIBC_CTOR_DTOR__ && defined __PIC__ +#ifdef __PIC__ .L_init: .word _init - .L_init .word _fini - .L_init |