diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-11-01 01:47:38 -0400 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-11-01 01:47:38 -0400 |
commit | e0e2212db300566d17468fc237a2708455ed3034 (patch) | |
tree | 02a6594b8f9ff8f4682fdc0b0d679c9a88cc1f4c | |
parent | ef2971d8dcc0768265d9b8c0eec40ea55251db8b (diff) |
Avoid changed section warning
-rw-r--r-- | ld_script.txt | 2 | ||||
-rw-r--r-- | src/rom_header_gf.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ld_script.txt b/ld_script.txt index 10abd8810..9c81f1da9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -48,7 +48,7 @@ SECTIONS { ALIGN(4) { src/rom_header.o(.text); - src/rom_header_gf.o(.text); + src/rom_header_gf.o(.text.*); src/crt0.o(.text); src/main.o(.text); gflib/malloc.o(.text); diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c index dc61fa1e3..5e78e3a93 100644 --- a/src/rom_header_gf.c +++ b/src/rom_header_gf.c @@ -83,7 +83,9 @@ struct GFRomHeader u32 unk_1E; }; -__attribute__((section(".text"))) +// This seems to need to be in the text section for some reason. +// To avoid a changed section warning it's put in a special .text.consts section instead of .text. +__attribute__((section(".text.consts"))) static const struct GFRomHeader sGFRomHeader = { .version = GAME_VERSION, .language = GAME_LANGUAGE, |