From a0ecf01921204bafeb3d54fb48bf5f5a0690dd3c Mon Sep 17 00:00:00 2001 From: Matteias Collet Date: Sun, 27 Nov 2022 03:23:35 +0000 Subject: [PATCH] fix branches not being resolved correctly --- Makefile | 5 +++-- sms.ld | 15 ++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 111481b..8228a24 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ OD := powerpc-eabi-objdump ODFLAGS := -EB -D -b binary -m powerpc:750 -M gekko --full-content LD := powerpc-eabi-ld +LDFLAGS := --unresolved-symbols=ignore-in-object-files OBJCOPY := powerpc-eabi-objcopy PYTHON := python3 @@ -33,13 +34,13 @@ blockCount := 7 all: $(OUT_DIR)/$(OUT_BIN) $(OUT_DIR)/$(OUT_ASM) $(OUT_DIR)/$(OUT_ASM): $(OUT_DIR)/$(OUT_BIN) - $(OD) $(ODFLAGS) $(OUT_DIR)/${OUT_BIN} > $(OUT_DIR)/$(OUT_ASM) + $(OD) $(ODFLAGS) $(OUT_DIR)/$(OUT_BIN) > $(OUT_DIR)/$(OUT_ASM) $(OUT_DIR)/$(OUT_BIN): $(OUT_DIR)/$(OUT_MAIN) $(OBJCOPY) -O binary $< $@ $(OUT_DIR)/$(OUT_MAIN): $(OBJ_FILES) $(LD_FILE) $(OUT_DIR) - $(LD) -o $@ -T $(LD_FILE) -Map $(OUT_DIR)/$(OUT_MAP) -r $(OBJ_FILES) + $(LD) $(LDFLAGS) -o $@ -T $(LD_FILE) -Map $(OUT_DIR)/$(OUT_MAP) $(OBJ_FILES) $(OBJ_FILES): $(SRC_FILES) $(CC) $(CFLAGS) -I $(INC_DIR) -o $@ -c $(@:.o=.c) diff --git a/sms.ld b/sms.ld index 4046c1f..4fb13ce 100644 --- a/sms.ld +++ b/sms.ld @@ -1,14 +1,15 @@ -mount_ = 0x80107b50; -open_ = 0x801072f4; -CARDOpen = 0x800a3cac; -CARDRead = 0x800a4640; -CARDClose = 0x800a3e24; - SECTIONS { - /* . = 0x817fa000; */ + . = 0x80000000; /* TODO: Determine Address */ .text : { *(.text) } .rodata : { *(.rodata) } .data : { *(.data) } .bss : { *(.bss) } .sdata : { *(.sdata) } } + +mount_ = 0x80107b50; +open_ = 0x801072f4; +CARDOpen = 0x800a3cac; +CARDRead = 0x800a4640; +CARDClose = 0x800a3e24; +foobar = 0x810a4e90;