mirror of
https://github.com/Mr-Wiseguy/Zelda64Recomp.git
synced 2024-12-22 19:11:54 +01:00
Modified how patch elf is linked to prevent address conflicts with vanilla symbols, update RT64
This commit is contained in:
parent
40d0b20939
commit
8db2c655c3
2
lib/rt64
2
lib/rt64
@ -1 +1 @@
|
||||
Subproject commit a14ada8fd7c8a9c93c896ee594fbaca583c02d17
|
||||
Subproject commit 482b9c9e48e97627b374a997dc8e21116af712e7
|
@ -7,7 +7,7 @@ OBJCOPY := llvm-objcopy
|
||||
CFLAGS := -target mips -mips2 -mabi=32 -O2 -mno-abicalls -mno-odd-spreg -fomit-frame-pointer -ffast-math -fno-unsafe-math-optimizations -mno-check-zero-division -G0 -Wall -Wextra -Wno-incompatible-library-redeclaration -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-variable -Wno-missing-braces -Wno-unsupported-floating-point-opt
|
||||
CPPFLAGS := -nostdinc -D_LANGUAGE_C -DMIPS -I. -I ../lib/mm-decomp/include -I ../lib/mm-decomp/src -I ../lib/mm-decomp/assets -I../lib/rt64/include
|
||||
LDFLAGS := -nostdlib -T patches.ld -T syms.ld --just-symbols=../mm.us.rev1.elf --allow-multiple-definition
|
||||
BINFLAGS := -O binary
|
||||
BINFLAGS := -O binary --remove-section=.bss --remove-section=.pad --remove-section=.text
|
||||
|
||||
C_SRCS := $(wildcard *.c)
|
||||
C_OBJS := $(C_SRCS:.c=.o)
|
||||
|
@ -1,17 +1,24 @@
|
||||
RAMBASE = 0x80800100; /* Used to hold any new symbols */
|
||||
EXTRA_RAM_SIZE = 0x01000000; /* Amount of extra ram allocated by recomp */
|
||||
|
||||
MEMORY {
|
||||
extram : ORIGIN = RAMBASE, LENGTH = 8M
|
||||
rom : ORIGIN = 0, LENGTH = 1M
|
||||
extram : ORIGIN = RAMBASE, LENGTH = 64M
|
||||
rom : ORIGIN = 0, LENGTH = 64M
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
.text : { *(.text*) } >extram AT >rom
|
||||
.ctors : { *(.ctors*) *(.init_array*) } >extram AT >rom
|
||||
.dtors : { *(.dtors*) } >extram AT >rom
|
||||
.rodata : { *(.rodata*) } >extram AT >rom
|
||||
.data : { *(.data*) } >extram AT >rom
|
||||
.bss (NOLOAD) : { *(.bss*) *(COMMON) } >extram
|
||||
|
||||
/* The following sections will be removed from the objcopy */
|
||||
/* bss isn't noload to make .text rom addresses valid for the recompiler */
|
||||
.bss : { *(.bss*) *(COMMON) } >extram AT >rom
|
||||
ASSERT(. < RAMBASE + EXTRA_RAM_SIZE, "Maxed out recomp extra ram")
|
||||
/* Padding to push .text to avoid conflicts with original function addresses */
|
||||
.pad : { . += 0x1000000; } >extram AT >rom
|
||||
.text : { *(.text*) } >extram AT >rom
|
||||
|
||||
.symtab 0 : { *(.symtab) }
|
||||
.strtab 0 : { *(.strtab) }
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "nfd.h"
|
||||
#include <filesystem>
|
||||
|
||||
std::string version_number = "v0.9.0";
|
||||
std::string version_number = "v0.9.0-dirty";
|
||||
|
||||
Rml::DataModelHandle model_handle;
|
||||
bool mm_rom_valid = false;
|
||||
|
Loading…
Reference in New Issue
Block a user