build: Fix linking.

This commit is contained in:
Solomon Peachy 2013-08-03 23:30:27 -04:00
parent 5210dc8573
commit fcde03e4ac
2 changed files with 6 additions and 5 deletions

View File

@ -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..

View File

@ -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) */ }
}