build: Fix linking.
This commit is contained in:
parent
5210dc8573
commit
fcde03e4ac
5
Makefile
5
Makefile
|
@ -31,7 +31,7 @@ $(MCU).ld: libs/$(MCU).ld.in inc/$(MCU)_hw.h
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
@$(E) " OBJCOPY " $@
|
@$(E) " OBJCOPY " $@
|
||||||
$(Q)$(OBJCOPY) -O binary $(<:.bin=.elf) $@
|
$(Q)$(OBJCOPY) -O binary $(<:.bin=.elf) $@ #--remove-section .note.gnu.build-id
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
@$(E) " CC " $<
|
@$(E) " CC " $<
|
||||||
|
@ -42,7 +42,8 @@ $(MCU).ld: libs/$(MCU).ld.in inc/$(MCU)_hw.h
|
||||||
$(Q)$(CC) -o $@ $(LDFLAGS) \
|
$(Q)$(CC) -o $@ $(LDFLAGS) \
|
||||||
-Wl,--gc-sections,-T$(MCU).ld \
|
-Wl,--gc-sections,-T$(MCU).ld \
|
||||||
-Wl,--whole-archive $(PROGRAM_LIBS) \
|
-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)
|
# -Wl,-allow-multiple-definition -flto=$(JLEVEL)
|
||||||
|
|
||||||
# Cleaning up..
|
# Cleaning up..
|
||||||
|
|
|
@ -19,7 +19,7 @@ SECTIONS {
|
||||||
.text : {
|
.text : {
|
||||||
. = ALIGN(0x80);
|
. = ALIGN(0x80);
|
||||||
_isr_vectors_offs = . - 0x08000000;
|
_isr_vectors_offs = . - 0x08000000;
|
||||||
KEEP(*(.isr_vectors))
|
KEEP(*(.isr_vector))
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
CREATE_OBJECT_SYMBOLS
|
CREATE_OBJECT_SYMBOLS
|
||||||
*(.text .text.*)
|
*(.text .text.*)
|
||||||
|
@ -154,6 +154,6 @@ SECTIONS {
|
||||||
.debug_ranges 0 : { *(.debug_ranges) }
|
.debug_ranges 0 : { *(.debug_ranges) }
|
||||||
|
|
||||||
.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
|
.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
|
||||||
.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
|
.note.gnu.arm.ident 0 : { *(.note.gnu.arm.ident) }
|
||||||
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
|
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) /* *(.note.gnu.build-id) */ }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue