diff --git a/GBA.mk b/GBA.mk index 62221d21..a81be08f 100644 --- a/GBA.mk +++ b/GBA.mk @@ -136,7 +136,7 @@ LIB := -L ../../tools/agbcc/lib -lc $(ROM): $(ELF) $(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@ -$(ELF): objs = $(shell grep -o -E "(\w|/)+\.o" linker.ld) +$(ELF): objs = $(shell grep -vE "\*\w+\.a" linker.ld | grep -oE "(\w|/)+\.o") $(ELF): $(BUILD_DIR)/linker.ld $$(addprefix $(BUILD_DIR)/, $$(objs)) cd $(BUILD_DIR) && $(LD) $(LDFLAGS) -n -T linker.ld -o ../../$@ $(LIB) $(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent diff --git a/linker.ld b/linker.ld index 039ac9c5..17221aa0 100644 --- a/linker.ld +++ b/linker.ld @@ -867,7 +867,7 @@ SECTIONS { src/gba/m4a.o(.text); asm/lib/libagbsyscall.o(.text); src/eeprom.o(.text); - libc.a(.text); + *libc.a:memcpy.o(.text); /* handwritten assembly in arm mode */ asm/src/intr.o(.text);