remove objcopy hack

This commit is contained in:
EpochFlame 2021-11-22 15:31:58 -05:00
parent 43ea385897
commit 561ddc9cb3
2 changed files with 1 additions and 5 deletions

View File

@ -63,12 +63,10 @@ MWLD_VERSION := 2.6
ifeq ($(WINDOWS),1)
WINE :=
AS := $(DEVKITPPC)/bin/powerpc-eabi-as.exe
OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy.exe
CPP := $(DEVKITPPC)/bin/powerpc-eabi-cpp.exe -P
else
WINE ?= wine
AS := $(DEVKITPPC)/bin/powerpc-eabi-as
OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy
CPP := $(DEVKITPPC)/bin/powerpc-eabi-cpp -P
endif
CC = $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwcceppc.exe
@ -136,8 +134,6 @@ tools:
$(ELF): $(O_FILES) $(LDSCRIPT)
@echo $(O_FILES) > build/o_files
$(LD) $(LDFLAGS) -o $@ -lcf $(LDSCRIPT) @build/o_files
# The Metrowerks linker doesn't generate physical addresses in the ELF program headers. This fixes it somehow.
$(OBJCOPY) $@ $@
$(BUILD_DIR)/%.o: %.s
$(AS) $(ASFLAGS) -o $@ $<

View File

@ -225,7 +225,7 @@ void read_elf_segments(DOL_map *map, const char *elf)
for(i=0; i<phnum; i++) {
if(swap32(phdrs[i].p_type) == PT_LOAD) {
uint32_t offset = swap32(phdrs[i].p_offset);
uint32_t paddr = swap32(phdrs[i].p_paddr);
uint32_t paddr = swap32(phdrs[i].p_vaddr);
uint32_t filesz = swap32(phdrs[i].p_filesz);
uint32_t memsz = swap32(phdrs[i].p_memsz);
uint32_t flags = swap32(phdrs[i].p_flags);