fix merge conf

This commit is contained in:
CrashOveride95
2020-12-03 19:16:09 -05:00
5 changed files with 55 additions and 74 deletions

77
sm64.ld
View File

@@ -1,8 +1,8 @@
OUTPUT_ARCH (mips)
/* include/segments.h defines SEG_POOL_START, SEG_POOL_END, SEG_BUFFERS,
* SEG_GODDARD, SEG_MAIN, SEG_ENGINE, SEG_FRAMEBUFFERS */
#define LINKER /* Removes externs from preprocessed script */
#include "segments.h"
#undef LINKER
#define BEGIN_SEG(name, addr) \
_##name##SegmentStart = ADDR(.name); \
@@ -79,7 +79,31 @@ SECTIONS
BEGIN_NOLOAD(zbuffer) {
BUILD_DIR/src/buffers/zbuffer.o(.bss*);
}
END_NOLOAD(zbuffer)
. = _zbufferSegmentNoloadEnd;
BEGIN_NOLOAD(buffers)
{
BUILD_DIR/src/buffers/buffers.o(.bss*);
BUILD_DIR/src/audio/globals_start.o(.bss*);
BUILD_DIR/src/audio/synthesis.o(.bss*);
BUILD_DIR/src/audio/heap.o(.bss*);
BUILD_DIR/src/audio/load.o(.bss*);
BUILD_DIR/src/audio/data.o(.bss*);
BUILD_DIR/src/audio*.o(.bss*);
#ifdef VERSION_EU
. = ALIGN(0x200);
#else
. = ALIGN(0x1000);
#endif
BUILD_DIR/src/buffers/gfx_output_buffer.o(.bss*);
}
END_NOLOAD(buffers)
/*ASSERT((. <= SEG_MAIN), "Error: buffers segment extended into main")*/
. = _buffersSegmentNoloadEnd;
/* lib/src/__osDevMgrMain.c and lib/src/osCreateViManager.c contain infinite
* loops compiled without -g, which cause the return statements and the .o
* files themselves to be aligned to 32-byte boundaries. But the linker
@@ -87,7 +111,7 @@ SECTIONS
* only to 16 bytes, in some cases misaligning them. We force the same to
* happen using the SUBALIGN directive. This is harmless; the alignment is
* just an optimization. */
BEGIN_SEG(main, SEG_MAIN) SUBALIGN(16)
BEGIN_SEG(main, .) SUBALIGN(16)
{
BUILD_DIR/asm/entry.o(.text);
BUILD_DIR/src/game/crash_screen.o(.text);
@@ -743,9 +767,11 @@ SECTIONS
_mainSegmentNoloadSizeLo = SIZEOF (.main.noload) & 0xffff;
_mainSegmentNoloadSizeHi = SIZEOF (.main.noload) >> 16;
ASSERT((. <= SEG_ENGINE), "Error: main segment extended into engine.")
/*ASSERT((. <= SEG_ENGINE), "Error: main segment extended into engine.")*/
BEGIN_SEG(engine, SEG_ENGINE)
. = _mainSegmentNoloadEnd;
BEGIN_SEG(engine, .)
{
BUILD_DIR/src/engine/math_util.o(.text);
BUILD_DIR/src/engine/graph_node.o(.text);
@@ -801,18 +827,22 @@ SECTIONS
BUILD_DIR/src/game/object_helpers.o(.bss*);
#endif
BUILD_DIR/src/engine*.o(.bss*);
. = ALIGN(0x40);
}
END_NOLOAD(engine)
ASSERT((. <= SEG_FRAMEBUFFERS), "Error: engine segment extended into framebuffers.")
/*ASSERT((. <= SEG_FRAMEBUFFERS), "Error: engine segment extended into framebuffers.")*/
. = SEG_FRAMEBUFFERS;
. = _engineSegmentNoloadEnd;
BEGIN_NOLOAD(framebuffers)
{
BUILD_DIR/src/buffers/framebuffers.o(.bss*);
}
END_NOLOAD(framebuffers)
__mainPoolStart = .;
__mainPoolSize = RAM_END - .;
__expansionRamStart = 0x80400000;
ASSERT((. <= __expansionRamStart), "Error: RDRAM expanded into Expansion RAM, despite Expansion RAM not being defined.")
@@ -949,40 +979,9 @@ SECTIONS
}
END_NOLOAD(goddard)
ASSERT((. <= SEG_POOL_END), "Error: extended past pool end.")
ASSERT((. <= (SEG_POOL_START + POOL_SIZE)), "Error: extended past pool end.")
. = SEG_BUFFERS;
BEGIN_NOLOAD(buffers)
{
BUILD_DIR/src/buffers/buffers.o(.bss*);
BUILD_DIR/src/audio/globals_start.o(.bss*);
#ifndef VERSION_SH
BUILD_DIR/src/audio/synthesis.o(.bss*);
BUILD_DIR/src/audio/heap.o(.bss*);
#endif
BUILD_DIR/src/audio/load.o(.bss*);
#ifdef VERSION_SH
BUILD_DIR/src/audio/unk_shindou_audio_file.o(.bss*);
#else
BUILD_DIR/src/audio/data.o(.bss*);
#endif
BUILD_DIR/src/audio*.o(.bss*);
#ifdef VERSION_EU
. = ALIGN(0x200);
#else
. = ALIGN(0x1000);
#endif
#ifdef VERSION_SH
. = . + 0xB000;
#endif
BUILD_DIR/src/buffers/gfx_output_buffer.o(.bss*);
}
END_NOLOAD(buffers)
#ifndef VERSION_SH
ASSERT((. <= SEG_MAIN), "Error: buffers segment extended into main")
#endif
/* 0x268020 0x268020-0 [0] */
BEGIN_SEG(intro, 0x14000000)
{