From fcde03e4ac95058722a6185f63e80514c331ee70 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sat, 3 Aug 2013 23:30:27 -0400 Subject: [PATCH] build: Fix linking. --- Makefile | 5 +++-- libs/stm32f10x.ld.in | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5368b2a..23c8fcf 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ $(MCU).ld: libs/$(MCU).ld.in inc/$(MCU)_hw.h %.bin: %.elf @$(E) " OBJCOPY " $@ - $(Q)$(OBJCOPY) -O binary $(<:.bin=.elf) $@ + $(Q)$(OBJCOPY) -O binary $(<:.bin=.elf) $@ #--remove-section .note.gnu.build-id %.o: %.c @$(E) " CC " $< @@ -42,7 +42,8 @@ $(MCU).ld: libs/$(MCU).ld.in inc/$(MCU)_hw.h $(Q)$(CC) -o $@ $(LDFLAGS) \ -Wl,--gc-sections,-T$(MCU).ld \ -Wl,--whole-archive $(PROGRAM_LIBS) \ - -Wl,--no-whole-archive $(LIBRARIES) + -Wl,--no-whole-archive $(LIBRARIES) \ + -Wl,--build-id=none # -Wl,-allow-multiple-definition -flto=$(JLEVEL) # Cleaning up.. diff --git a/libs/stm32f10x.ld.in b/libs/stm32f10x.ld.in index ce4ba51..d2b671f 100644 --- a/libs/stm32f10x.ld.in +++ b/libs/stm32f10x.ld.in @@ -19,7 +19,7 @@ SECTIONS { .text : { . = ALIGN(0x80); _isr_vectors_offs = . - 0x08000000; - KEEP(*(.isr_vectors)) + KEEP(*(.isr_vector)) . = ALIGN(4); CREATE_OBJECT_SYMBOLS *(.text .text.*) @@ -154,6 +154,6 @@ SECTIONS { .debug_ranges 0 : { *(.debug_ranges) } .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } - .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) } + .note.gnu.arm.ident 0 : { *(.note.gnu.arm.ident) } + /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) /* *(.note.gnu.build-id) */ } }