fix branches not being resolved correctly

This commit is contained in:
Matteias Collet 2022-11-27 03:23:35 +00:00 committed by GitHub
parent 455384c501
commit a0ecf01921
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View file

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

15
sms.ld
View file

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