From 941b42a269a261eebfbe4007d0d27a695b68d8be Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Sat, 19 Jul 2014 23:15:50 +0400 Subject: [PATCH] Makefile: link with -nostartfiles This saves a bit more space and a reasonable thing to do since a custom startup is used anyway. Build-tested only. Signed-off-by: Paul Fertser --- Makefile | 1 + src/main/startup/startup_stm32f10x_md_gcc.S | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 00fd07339..7d3eab1f8 100644 --- a/Makefile +++ b/Makefile @@ -366,6 +366,7 @@ ASFLAGS = $(ARCH_FLAGS) \ # XXX Map/crossref output? LDFLAGS = -lm \ + -nostartfiles \ $(ARCH_FLAGS) \ $(LTO_FLAGS) \ $(DEBUG_FLAGS) \ diff --git a/src/main/startup/startup_stm32f10x_md_gcc.S b/src/main/startup/startup_stm32f10x_md_gcc.S index 28159cb16..1e62fca7b 100644 --- a/src/main/startup/startup_stm32f10x_md_gcc.S +++ b/src/main/startup/startup_stm32f10x_md_gcc.S @@ -99,8 +99,6 @@ LoopFillZerobss: /* Call the clock system intitialization function.*/ bl SystemInit -/* Call static constructors */ - bl __libc_init_array /* Call the application's entry point.*/ bl main /* Atollic update, branch LoopForever */