mirror of
https://github.com/projectPiki/pikmin2.git
synced 2025-02-13 01:48:49 +00:00
use 2.6 linker
This commit is contained in:
parent
4f8675f97b
commit
bc9cf284e6
7
Makefile
7
Makefile
@ -60,7 +60,7 @@ O_FILES := $(GROUP_0_FILES) $(JSYSTEM) $(DOLPHIN)\
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
MWCC_VERSION := 2.6
|
||||
MWLD_VERSION := 2.7e
|
||||
MWLD_VERSION := 2.6
|
||||
|
||||
# Programs
|
||||
ifeq ($(WINDOWS),1)
|
||||
@ -69,7 +69,7 @@ ifeq ($(WINDOWS),1)
|
||||
OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy.exe
|
||||
CPP := $(DEVKITPPC)/bin/powerpc-eabi-cpp.exe -P
|
||||
else
|
||||
WINE := wine
|
||||
WINE ?= wine
|
||||
AS := $(DEVKITPPC)/bin/powerpc-eabi-as
|
||||
OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy
|
||||
CPP := $(DEVKITPPC)/bin/powerpc-eabi-cpp -P
|
||||
@ -78,7 +78,7 @@ CC = $(WINE) tools/mwcc_compiler/$(MWCC_VERSION)/mwcceppc.exe
|
||||
LD := $(WINE) tools/mwcc_compiler/$(MWLD_VERSION)/mwldeppc.exe
|
||||
ELF2DOL := tools/elf2dol
|
||||
SHA1SUM := sha1sum
|
||||
PYTHON := python
|
||||
PYTHON := python3
|
||||
|
||||
# POSTPROC := tools/postprocess.py
|
||||
|
||||
@ -132,7 +132,6 @@ tools:
|
||||
$(MAKE) -C tools
|
||||
|
||||
$(ELF): $(O_FILES) $(LDSCRIPT)
|
||||
./$(PATCHLINKER) $(LD) 117
|
||||
@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.
|
||||
|
@ -48,8 +48,8 @@ __init_cpp:
|
||||
/* 800F2FD8 000EFF18 90 01 00 04 */ stw r0, 4(r1)
|
||||
/* 800F2FDC 000EFF1C 94 21 FF F0 */ stwu r1, -0x10(r1)
|
||||
/* 800F2FE0 000EFF20 93 E1 00 0C */ stw r31, 0xc(r1)
|
||||
/* 800F2FE4 000EFF24 3C 60 80 47 */ lis r3, __init_cpp_exceptions_reference@ha
|
||||
/* 800F2FE8 000EFF28 38 03 2F 00 */ addi r0, r3, __init_cpp_exceptions_reference@l
|
||||
/* 800F2FE4 000EFF24 3C 60 80 47 */ lis r3, _ctors@ha
|
||||
/* 800F2FE8 000EFF28 38 03 2F 00 */ addi r0, r3, _ctors@l
|
||||
/* 800F2FEC 000EFF2C 7C 1F 03 78 */ mr r31, r0
|
||||
/* 800F2FF0 000EFF30 48 00 00 04 */ b lbl_800F2FF4
|
||||
lbl_800F2FF4:
|
||||
|
@ -29,8 +29,8 @@ exit:
|
||||
/* 800C2484 000BF3C4 38 60 00 00 */ li r3, 0
|
||||
/* 800C2488 000BF3C8 48 00 3D D1 */ bl __end_critical_region
|
||||
/* 800C248C 000BF3CC 4B FF F2 2D */ bl __destroy_global_chain
|
||||
/* 800C2490 000BF3D0 3C 60 80 47 */ lis r3, __destroy_global_chain_reference@ha
|
||||
/* 800C2494 000BF3D4 38 03 32 C0 */ addi r0, r3, __destroy_global_chain_reference@l
|
||||
/* 800C2490 000BF3D0 3C 60 80 47 */ lis r3, _dtors@ha
|
||||
/* 800C2494 000BF3D4 38 03 32 C0 */ addi r0, r3, _dtors@l
|
||||
/* 800C2498 000BF3D8 7C 1F 03 78 */ mr r31, r0
|
||||
/* 800C249C 000BF3DC 48 00 00 10 */ b lbl_800C24AC
|
||||
lbl_800C24A0:
|
||||
|
@ -9,7 +9,7 @@ lbl_805168D8:
|
||||
lbl_805168DC:
|
||||
.4byte 0xFFFFFFFF
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E40
|
||||
lbl_80520E40:
|
||||
.skip 0x4
|
||||
|
@ -171,7 +171,7 @@ lbl_80516A88:
|
||||
.4byte 0xFFFFFFFF
|
||||
.4byte 0x00000000
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E48
|
||||
lbl_80520E48:
|
||||
.skip 0x4
|
||||
|
@ -8,7 +8,7 @@ lbl_80516AE0:
|
||||
lbl_80516AE4:
|
||||
.4byte 0xFFFFFFFF
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E50
|
||||
lbl_80520E50:
|
||||
.skip 0x4
|
||||
|
@ -2,4 +2,4 @@
|
||||
.section .ctors, "wa" # 0x80472F00 - 0x804732C0
|
||||
.global __init_cpp_exceptions_reference
|
||||
__init_cpp_exceptions_reference:
|
||||
#.4byte __init_cpp_exceptions
|
||||
.4byte __init_cpp_exceptions
|
||||
|
@ -2,7 +2,7 @@
|
||||
.section .dtors, "wa" # 0x804732C0 - 0x804732E0
|
||||
.global __destroy_global_chain_reference
|
||||
__destroy_global_chain_reference:
|
||||
#.4byte __destroy_global_chain
|
||||
.4byte __destroy_global_chain
|
||||
.global __fini_cpp_exceptions_reference
|
||||
__fini_cpp_exceptions_reference:
|
||||
.4byte __fini_cpp_exceptions
|
||||
|
@ -833,7 +833,7 @@ lbl_805185B8:
|
||||
lbl_805185BC:
|
||||
.4byte 0x0D0A0000
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E58
|
||||
lbl_80520E58:
|
||||
.skip 0x4
|
||||
|
@ -1122,7 +1122,7 @@ lbl_80519EA8:
|
||||
lbl_80519EB0:
|
||||
.float 0.35
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E80
|
||||
lbl_80520E80:
|
||||
.skip 0x8
|
||||
|
@ -1077,7 +1077,7 @@ lbl_80518B50:
|
||||
lbl_80518B58:
|
||||
.float 128000.0
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E60
|
||||
lbl_80520E60:
|
||||
.skip 0x4
|
||||
|
@ -494,7 +494,7 @@ lbl_80519580:
|
||||
.float 0.25
|
||||
.4byte 0x00000000
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E68
|
||||
lbl_80520E68:
|
||||
.skip 0x4
|
||||
|
@ -291,7 +291,7 @@ lbl_80520030:
|
||||
lbl_80520034:
|
||||
.4byte 0x43700000
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520EC0
|
||||
lbl_80520EC0:
|
||||
.skip 0x4
|
||||
|
@ -763,7 +763,7 @@ lbl_80520178:
|
||||
.4byte 0x3F2E147B
|
||||
.4byte 0x00000000
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520EC8
|
||||
lbl_80520EC8:
|
||||
.skip 0x4
|
||||
|
@ -177,7 +177,7 @@ lbl_80520238:
|
||||
.4byte 0x42700000
|
||||
.4byte 0x00000000
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520ED0
|
||||
lbl_80520ED0:
|
||||
.skip 0x4
|
||||
|
@ -79,7 +79,7 @@ lbl_8051A7D0:
|
||||
lbl_8051A7D4:
|
||||
.float 0.5
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E90
|
||||
lbl_80520E90:
|
||||
.skip 0x4
|
||||
|
@ -82,7 +82,7 @@ lbl_8051A830:
|
||||
lbl_8051A834:
|
||||
.4byte 0x43160000
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520EA8
|
||||
lbl_80520EA8:
|
||||
.skip 0x4
|
||||
|
@ -237,7 +237,7 @@ lbl_8051A658:
|
||||
.4byte 0xFFFFFF7F
|
||||
.4byte 0x00000000
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520E88
|
||||
lbl_80520E88:
|
||||
.skip 0x8
|
||||
|
@ -196,7 +196,7 @@ lbl_8051E068:
|
||||
lbl_8051E06C:
|
||||
.4byte 0x3ECCCCCD
|
||||
|
||||
.section .sbss2 # 0x80520e40 - 0x80520ED8
|
||||
.section .sbss2, "", @nobits # 0x80520e40 - 0x80520ED8
|
||||
.global lbl_80520EB8
|
||||
lbl_80520EB8:
|
||||
.skip 0x2
|
||||
|
@ -54,3 +54,10 @@ GROUP: {
|
||||
_size_sbss_reduced = _size_sbss-0x1C;
|
||||
_size_sdata2_reduced = _size_sdata2-0x10;
|
||||
}
|
||||
|
||||
FORCEFILES {
|
||||
__init_cpp_exceptions.o
|
||||
ebiP2TitleCamera.o
|
||||
ctors.o
|
||||
dtors.o
|
||||
}
|
||||
|
0
patch_linker.sh
Normal file → Executable file
0
patch_linker.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user