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.

Coding > Problems with Jeff's CRT0 and putting stuff in IWRAMw

#1426 - daavid - Sat Jan 18, 2003 3:44 pm

I'm using Jeff's CRT0.S and i'm trying to use the __attribute__ ((section (".iwram")) stuff to put a function, RitaPunkt3d(), in IWRAM. BiosDiv() and RitaPixelMode3() are implemented in asm and have a ".section iwram" in their .S files so they are in iwram (i verified this with a debugger).
If i put only the asm function in iwram everything works fine but when i try to put RitaPunkt3d() in iwram i get this:

/home/david/coding/gba/k?d/3dpunkt/3d-punkt.c:74: relocation truncated to fit: R_ARM_PC24 RitaPunkt3d
/home/david/coding/gba/k?d/3dpunkt/3d-punkt.c:31: relocation truncated to fit: R_ARM_PC24 BiosDiv
/home/david/coding/gba/k?d/3dpunkt/3d-punkt.c:32: relocation truncated to fit: R_ARM_PC24 BiosDiv
/home/david/coding/gba/k?d/3dpunkt/3d-punkt.c:37: relocation truncated to fit: R_ARM_PC24 RitaPixelMode3

Someone suggested that this might be because IWRAM is full but the entire ROM is only 3.4 kbytes when compiled so that's not the problem.

Regards,
David