From 430d14d2155fe4484d164d15755c420969c03c43 Mon Sep 17 00:00:00 2001 From: Sun Daowen Date: Sun, 9 Jun 2024 01:19:45 +0800 Subject: [PATCH] Fix the issue where zero-initialized variables in non-.bss segments are incorrectly compiled into the .bss segment and discarded in the latest GCC version. --- data/fonts/glyphs_1.h | 2 +- data/fonts/glyphs_2.h | 2 +- include/variables.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/fonts/glyphs_1.h b/data/fonts/glyphs_1.h index 93a8a1ad1..8d57c6943 100644 --- a/data/fonts/glyphs_1.h +++ b/data/fonts/glyphs_1.h @@ -1,4 +1,4 @@ -struct Glyph gUnknown_08589C9C = +CONST_DATA struct Glyph gUnknown_08589C9C = { .sjisNext = NULL, .sjisByte1 = 0, diff --git a/data/fonts/glyphs_2.h b/data/fonts/glyphs_2.h index 80a18677d..bd8f03911 100644 --- a/data/fonts/glyphs_2.h +++ b/data/fonts/glyphs_2.h @@ -1,4 +1,4 @@ -struct Glyph gUnknown_0858CBEC = +CONST_DATA struct Glyph gUnknown_0858CBEC = { .sjisNext = NULL, .sjisByte1 = 0, diff --git a/include/variables.h b/include/variables.h index ec9ab7d21..86a7ed697 100644 --- a/include/variables.h +++ b/include/variables.h @@ -377,7 +377,7 @@ extern struct ProcCmd CONST_DATA ProcScr_0859163C[]; extern const char *gStrPrefix[][2]; //extern struct {u32 *unk0; u32 *unk4; u32 *unk8;} gStrPrefix; -// extern ??? gUnknown_08591AB4 +extern CONST_DATA int gUnknown_08591AB4[]; extern struct ProcCmd CONST_DATA ProcScr_EventFadefx[]; extern struct ProcCmd CONST_DATA ProcScr_ShinningStonefx[];