mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2024-11-09 15:55:06 +01:00
Pull in symbols from the decomp elf automatically when building the patches elf
This commit is contained in:
parent
e0ac016936
commit
ddaac3cd8f
@ -4,9 +4,9 @@ CC := clang
|
|||||||
LD := ld.lld
|
LD := ld.lld
|
||||||
OBJCOPY := llvm-objcopy
|
OBJCOPY := llvm-objcopy
|
||||||
|
|
||||||
CFLAGS := -target mips -mips2 -mabi=32 -O2 -mno-odd-spreg -fomit-frame-pointer -G0 -Wall -Wextra -Wno-incompatible-library-redeclaration -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-variable
|
CFLAGS := -target mips -mips2 -mabi=32 -O2 -mno-abicalls -mno-odd-spreg -fomit-frame-pointer -mno-check-zero-division -G0 -Wall -Wextra -Wno-incompatible-library-redeclaration -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-variable -Wno-missing-braces
|
||||||
CPPFLAGS := -nostdinc -D_LANGUAGE_C -DMIPS -I ../../mm/include -I ../../mm/src -I ../../mm/build -I ../../mm/assets
|
CPPFLAGS := -nostdinc -D_LANGUAGE_C -DMIPS -I ../../mm/include -I ../../mm/src -I ../../mm/build -I ../../mm/assets -I../../mupen_rt64/mupen64plus-video-rt64/include
|
||||||
LDFLAGS := -nostdlib -T patches.ld -T syms.ld
|
LDFLAGS := -nostdlib -T patches.ld -T syms.ld --just-symbols=../mm.us.rev1.elf --allow-multiple-definition
|
||||||
BINFLAGS := -O binary
|
BINFLAGS := -O binary
|
||||||
|
|
||||||
C_SRCS := $(wildcard *.c)
|
C_SRCS := $(wildcard *.c)
|
||||||
@ -19,7 +19,7 @@ $(DATABIN): $(TARGET)
|
|||||||
$(OBJCOPY) $(BINFLAGS) $(TARGET) $@
|
$(OBJCOPY) $(BINFLAGS) $(TARGET) $@
|
||||||
|
|
||||||
$(TARGET): $(C_OBJS) patches.ld syms.ld
|
$(TARGET): $(C_OBJS) patches.ld syms.ld
|
||||||
$(LD) $(LDFLAGS) $(C_OBJS) -o $@
|
$(LD) $(C_OBJS) $(LDFLAGS) -o $@
|
||||||
|
|
||||||
$(C_OBJS): %.o : %.c
|
$(C_OBJS): %.o : %.c
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) $< -MMD -MF $(@:.o=.d) -c -o $@
|
$(CC) $(CFLAGS) $(CPPFLAGS) $< -MMD -MF $(@:.o=.d) -c -o $@
|
||||||
|
@ -3,15 +3,3 @@ __start = 0x80000000;
|
|||||||
/* Dummy addresses that get recompiled into function calls */
|
/* Dummy addresses that get recompiled into function calls */
|
||||||
recomp_get_item_inputs = 0x81000000;
|
recomp_get_item_inputs = 0x81000000;
|
||||||
recomp_puts = 0x81000004;
|
recomp_puts = 0x81000004;
|
||||||
|
|
||||||
/* TODO pull these symbols from the elf file directly */
|
|
||||||
Player_PostLimbDrawGameplay = 0x80128BD0;
|
|
||||||
Player_DrawImpl = 0x801246F4;
|
|
||||||
gRegEditor = 0x801f3f60;
|
|
||||||
Audio_PlaySfx = 0x8019f0c8;
|
|
||||||
gSaveContext = 0x801ef670;
|
|
||||||
Interface_SetHudVisibility = 0x8010ef68;
|
|
||||||
PadMgr_GetInput = 0x80175f98;
|
|
||||||
Inventory_GetBtnBItem = 0x8012ec80;
|
|
||||||
gItemSlots = 0x801c2078;
|
|
||||||
_Printf = 0x8008e050;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user