CRT0 and ldscript for GBA bug

Post Reply
wwcube
Posts: 2
Joined: Wed Nov 07, 2007 5:56 pm

CRT0 and ldscript for GBA bug

Post by wwcube » Sun Jun 26, 2011 1:33 am

When I complied example project for GBA, some link error occuerred.
To fix this error, we must edit gba_crt0.s and gba_cart.ld, then remake crt0 for GBA.

(1) edit gba_crt0.s and gba_cart.ld as follows:
replace '__data_start__' to '__data_start' and '__data_end__' to '__data_end' .
(2) rebuild crt0 as follows:
execute "make CRT=gba" at devkitARM/arm-eabi/lib folder.

thanx.

WinterMute
Site Admin
Posts: 1853
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: CRT0 and ldscript for GBA bug

Post by WinterMute » Sun Jun 26, 2011 10:55 am

This is completely the wrong fix, the link error happens with multiboot images - __data_start & __data_end need to be replaced with __data_start__ and __data_end__ in the gba_mb.ld linkscript.
Help keep devkitPro toolchains free, Donate today

Personal Blog

wwcube
Posts: 2
Joined: Wed Nov 07, 2007 5:56 pm

Re: CRT0 and ldscript for GBA bug

Post by wwcube » Sun Jun 26, 2011 11:12 am

Hi,WinterMute.
I also did the same correction as you first.
However, I corrected to match it to the symbol of NDS and GP32 again.
I think that you may correct it by which method.
Thank you.

WinterMute
Site Admin
Posts: 1853
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: CRT0 and ldscript for GBA bug

Post by WinterMute » Sun Jun 26, 2011 11:44 pm

Always apply the simplest fix ...
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests