Avoid changed section warning

This commit is contained in:
GriffinR 2021-11-01 01:47:38 -04:00
parent ef2971d8dc
commit e0e2212db3
2 changed files with 4 additions and 2 deletions

View File

@ -48,7 +48,7 @@ SECTIONS {
ALIGN(4) ALIGN(4)
{ {
src/rom_header.o(.text); src/rom_header.o(.text);
src/rom_header_gf.o(.text); src/rom_header_gf.o(.text.*);
src/crt0.o(.text); src/crt0.o(.text);
src/main.o(.text); src/main.o(.text);
gflib/malloc.o(.text); gflib/malloc.o(.text);

View File

@ -83,7 +83,9 @@ struct GFRomHeader
u32 unk_1E; 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 = { static const struct GFRomHeader sGFRomHeader = {
.version = GAME_VERSION, .version = GAME_VERSION,
.language = GAME_LANGUAGE, .language = GAME_LANGUAGE,