#14113 - xcom_agent - Tue Dec 30, 2003 9:08 am
Hey guys,
I looked around in the various FAQs and couldn't find how to fix this. I'm not an expert with gcc and the devkitadvance stuff (i'm totally sold to MSVC, bash all you want), but i still managed to make my little project compile and work properly. In order to have control over where data and code would be placed, i started reading about LinkScript and crt0.S. Now, I compile using devkitadvance and the Linkscript and all that. The dev'rs GBA FAQ listed how to store data in ROM i think, but not code, but i tried to copy/paste some line and replace some .iwram by .rodata and everything worked fine (see bottom of post for definitions). Read-only data goes in ROM and the code is executed from wherever i want. I actually do use ROM to store most of my code since i need all the ERAM; only crucial code goes in IRAM.
Ok, so now, my problem is that i'm getting these really annoying messages from the assembler when i compile:
Assembler messages:
Warning: Setting incorrect section attributes for .rodata
and
Warning: Ignoring changed section attributes for .iwram
The second message isn't scary, but the first one does bother me.
Even though my gba program compiles and works exactly the way i want it to (i did disassemble it using an emulator and code and it always looked the way it should), i know that Warnings have a purpose...
So, I'd like to know if anyone knows whether those messages are actually meaning something important, and if so how to fix them, otherwise how disable them. Here's my list of defines for defining where data and code go.
#define DATA_IN_EWRAM __attribute__ ((section (".ewram")))
#define DATA_IN_IWRAM __attribute__ ((section (".iwram")))
#define DATA_IN_ROM __attribute__ ((section (".rodata")))
#define CODE_IN_IWRAM __attribute__ ((section (".iwram"), long_call))
#define CODE_IN_EWRAM __attribute__ ((section (".ewram"), long_call))
#define CODE_IN_ROM __attribute__ ((section (".rodata"), long_call))
Any help would be extremely appreciated :)
Thx in advance,
Alex Hetu
I looked around in the various FAQs and couldn't find how to fix this. I'm not an expert with gcc and the devkitadvance stuff (i'm totally sold to MSVC, bash all you want), but i still managed to make my little project compile and work properly. In order to have control over where data and code would be placed, i started reading about LinkScript and crt0.S. Now, I compile using devkitadvance and the Linkscript and all that. The dev'rs GBA FAQ listed how to store data in ROM i think, but not code, but i tried to copy/paste some line and replace some .iwram by .rodata and everything worked fine (see bottom of post for definitions). Read-only data goes in ROM and the code is executed from wherever i want. I actually do use ROM to store most of my code since i need all the ERAM; only crucial code goes in IRAM.
Ok, so now, my problem is that i'm getting these really annoying messages from the assembler when i compile:
Assembler messages:
Warning: Setting incorrect section attributes for .rodata
and
Warning: Ignoring changed section attributes for .iwram
The second message isn't scary, but the first one does bother me.
Even though my gba program compiles and works exactly the way i want it to (i did disassemble it using an emulator and code and it always looked the way it should), i know that Warnings have a purpose...
So, I'd like to know if anyone knows whether those messages are actually meaning something important, and if so how to fix them, otherwise how disable them. Here's my list of defines for defining where data and code go.
#define DATA_IN_EWRAM __attribute__ ((section (".ewram")))
#define DATA_IN_IWRAM __attribute__ ((section (".iwram")))
#define DATA_IN_ROM __attribute__ ((section (".rodata")))
#define CODE_IN_IWRAM __attribute__ ((section (".iwram"), long_call))
#define CODE_IN_EWRAM __attribute__ ((section (".ewram"), long_call))
#define CODE_IN_ROM __attribute__ ((section (".rodata"), long_call))
Any help would be extremely appreciated :)
Thx in advance,
Alex Hetu