gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

ASM > How would this look for GCC asm?

#7336 - Lupin - Sun Jun 15, 2003 1:23 pm

I found this code:

AREA fixed_onedivtab, DATA, READONLY

onedivtab
DCD 0x00000000,0x00000000,0x80000000,0x55555555,0x40000000,0x33333333,0x2AAAAAAA,0x24924924
(...)

how would this look when I compile this with GCC??

#7359 - torne - Mon Jun 16, 2003 11:22 am

#7383 - Lupin - Mon Jun 16, 2003 5:29 pm

Ok, but now I get these errors:

/cygdrive/c/DevKitAdv/bin/ld: section .iwram [08026424 -> 080264e3] overlaps section fixed_onedivtab [08026410 -> 080266af]
/cygdrive/c/DevKitAdv/bin/ld: section .data [080264e4 -> 08026543] overlaps section fixed_onedivtab [08026410 -> 080266af]

I don't have any idea where the problem is :(

I'm pretty new to ASM, I just did some win32 asm once...

#7389 - Jason Wilkins - Mon Jun 16, 2003 8:25 pm

The section fixed_onedivtab is not mentioned in the linkscript, so the linker just throws it somewhere (dunno where), and it ends up being in the same place as something else.

Make the section .data, .rodata, .iwram, or .ewram, or write a link script which tells ld were to put fixed_onedivtab.
_________________
http://devkitadv.sourceforge.net