From 7c57699fa5205aa7bb3d639a6b8d4680bc03d8dc Mon Sep 17 00:00:00 2001 From: nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> Date: Tue, 1 Jan 2019 00:38:49 +0800 Subject: [PATCH] Remove sed from ld_script, replace with INCLUDEs --- Makefile | 2 +- ld_script.sed | 14 -------------- ld_script.txt | 6 +++--- 3 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 ld_script.sed diff --git a/Makefile b/Makefile index 9027fad8a..8f632008b 100644 --- a/Makefile +++ b/Makefile @@ -178,7 +178,7 @@ $(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt $(RAMSCRGEN) ewram_data $< ENGLISH > $@ $(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld - cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld + cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../ld_script.txt > ld_script.ld $(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB) diff --git a/ld_script.sed b/ld_script.sed deleted file mode 100644 index b91542b6f..000000000 --- a/ld_script.sed +++ /dev/null @@ -1,14 +0,0 @@ -// { - r sym_ewram.ld - d -} - -// { - r sym_bss.ld - d -} - -// { - r sym_common.ld - d -} diff --git a/ld_script.txt b/ld_script.txt index c0810850e..660c1d60d 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -13,7 +13,7 @@ SECTIONS { . = 0x1C000; - + INCLUDE "sym_ewram.ld" . = 0x40000; } @@ -24,13 +24,13 @@ SECTIONS { ALIGN(4) { /* .bss starts at 0x3000000 */ - + INCLUDE "sym_bss.ld" /* .bss.code starts at 0x3001AA8 */ src/m4a_2.o(.bss.code); /* COMMON starts at 0x30022A8 */ - + INCLUDE "sym_common.ld" *libc.a:sbrkr.o(COMMON); end = .; . = 0x8000;