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.

DS development > relocation truncated to fit

#154889 - elhobbs - Tue Apr 22, 2008 1:18 pm

I just updated my devkitarm installation to r22. I am now getting "relocation truncated to fit" error messages when linking. The problem is related to some functions that I put in itcm. the linkscripts do not appear to handle .itcm.c* files differently from r21 to r22. I did a little looking a found that the error message is related to jumps being too far. has anyone else run into this problem or better yet, know a solution? I would really like to keep these functions in itcm as it did provide a small boost under r21.

#154892 - eKid - Tue Apr 22, 2008 2:31 pm

Maybe itcm got moved a bit. Append __attribute((long_call)) to your function prototypes to tell the compiler to use long jumps to those functions.