Page 1 of 1

CRT0 and ldscript for GBA bug

Posted: Sun Jun 26, 2011 1:33 am
by wwcube
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.

Re: CRT0 and ldscript for GBA bug

Posted: Sun Jun 26, 2011 10:55 am
by WinterMute
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.

Re: CRT0 and ldscript for GBA bug

Posted: Sun Jun 26, 2011 11:12 am
by wwcube
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.

Re: CRT0 and ldscript for GBA bug

Posted: Sun Jun 26, 2011 11:44 pm
by WinterMute
Always apply the simplest fix ...