mirror of
https://github.com/farisawan-2000/kirby64.git
synced 2025-02-17 03:18:24 +00:00
add more compatibility to asset extractor; split undefined and unnamed syms
This commit is contained in:
parent
3905243a9e
commit
5652e75166
6
Makefile
6
Makefile
@ -54,7 +54,9 @@ TEXTURES_DIR := textures
|
||||
INCLUDE_FLAGS := -I$(BUILD_DIR)
|
||||
ASFLAGS = -mtune=vr4300 -march=vr4300 --no-pad-sections -mabi=32 -mips3 $(INCLUDE_FLAGS)
|
||||
# CFLAGS = -Wall -O2 -mtune=vr4300 -march=vr4300 -G 0 -c -Wab,-r4300_mul
|
||||
LDFLAGS = -T $(BUILD_DIR)/$(LD_SCRIPT) -mips3 --accept-unknown-input-arch -T libultra_unused.txt --no-check-sections -T undefined_syms.txt -Map $(BUILD_DIR)/$(TARGET).map
|
||||
LDFLAGS = --no-check-sections -mips3 --accept-unknown-input-arch \
|
||||
-T $(BUILD_DIR)/$(LD_SCRIPT) -T libultra_unused.txt -T unnamed_syms.txt -T undefined_syms.txt \
|
||||
-Map $(BUILD_DIR)/$(TARGET).map
|
||||
PRELIM_OBJCOPY_FLAGS = --pad-to=0x101000 --gap-fill=0x00
|
||||
OBJCOPY_FLAGS = --pad-to=0x2000000 --gap-fill=0xFF
|
||||
|
||||
@ -261,7 +263,7 @@ $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c
|
||||
$(BUILD_DIR)/$(UCODE_BASE_DIR)/%.o : $(UCODE_BASE_DIR)/%
|
||||
$(OBJCOPY) -I binary -O elf32-big $< $@
|
||||
|
||||
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(UCODE_LD) undefined_syms.txt $(BUILD_DIR)/assets/assets.marker
|
||||
$(BUILD_DIR)/$(LD_SCRIPT): $(LD_SCRIPT) $(UCODE_LD) unnamed_syms.txt $(BUILD_DIR)/assets/assets.marker
|
||||
$(CPP) $(VERSION_CFLAGS) $(INCLUDE_CFLAGS) -MMD -MP -MT $@ -MF $@.d -o $@ $< \
|
||||
-DBUILD_DIR=$(BUILD_DIR) -Umips
|
||||
|
||||
|
@ -205,8 +205,8 @@ SECTIONS
|
||||
BUILD_DIR/libultra.a:visetyscale.o(.text);
|
||||
BUILD_DIR/libultra.a:aisetnextbuf.o(.text);
|
||||
BUILD_DIR/libultra.a:ai.o(.text);
|
||||
/*BUILD_DIR/libultra.a:conteepread.o(.text);*/
|
||||
BUILD_DIR/asm/ovl0/func_80038F60.o(.text);
|
||||
BUILD_DIR/libultra.a:conteepread.o(.text);
|
||||
/*BUILD_DIR/asm/ovl0/func_80038F60.o(.text);*/
|
||||
BUILD_DIR/libultra.a:vigetcurrframebuf.o(.text);
|
||||
BUILD_DIR/libultra.a:spsetpc.o(.text);
|
||||
}
|
||||
|
@ -2,6 +2,9 @@
|
||||
#include <fstream>
|
||||
#include <sys/stat.h>
|
||||
#include "json.hpp"
|
||||
#include <stdio.h>
|
||||
#include <linux/limits.h>
|
||||
#include <unistd.h>
|
||||
#include "extract_assets.hpp"
|
||||
#define RELEASE
|
||||
|
||||
@ -222,9 +225,16 @@ int main(int argc, char **argv) {
|
||||
|
||||
#pragma omp task
|
||||
for (auto& [key, value] : j.items()) {
|
||||
fs::path p = key;
|
||||
char *curr_dirname = get_current_dir_name();
|
||||
|
||||
fs::remove(p);
|
||||
char toDelete[PATH_MAX];
|
||||
sprintf(toDelete, "%s/%s", curr_dirname, key.c_str());
|
||||
|
||||
fmt::print("Removing {}...\n", toDelete);
|
||||
if (remove(toDelete) != 0) {
|
||||
fmt::print(stderr, "ERROR removing {} !\n", toDelete);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
7424
undefined_syms.txt
7424
undefined_syms.txt
File diff suppressed because it is too large
Load Diff
7427
unnamed_syms.txt
Normal file
7427
unnamed_syms.txt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user