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.

Beginners > gcc-3.4.1 and linux

#24441 - TheGuru - Tue Aug 03, 2004 8:18 pm

I am trying to get gcc setup under linux to develop gba games and am having the overlap problem that is mentioned with the latest version of devkitadv for linux. I know that he mentions replacing the lnkscript and crt0.o with the downloaded ones but I haven't been successful in getting anything to work. I followed the instructions on linux.gbadev.org for setting all this up except I used the latest versions of all software available. The exact errors I get when trying to compile are as follows:

Code:

/usr/local/lib/gcc/arm-thumb-elf/3.4.1/../../../../arm-thumb-elf/bin/ld: section .data [020003ac -> 020003b3] overlaps section .init [02000398 -> 020003b3]
/usr/local/lib/gcc/arm-thumb-elf/3.4.1/../../../../arm-thumb-elf/bin/ld: section .jcr [020003b4 -> 020003b7] overlaps section .fini [020003b4 -> 020003cb]
collect2: ld returned 1 exit status


Any help will be greatly appreciated :)

Thanks

#24545 - wintermute - Thu Aug 05, 2004 3:48 pm

Use DevkitARM instead.

http://www.devkit.tk

there's a precompiled binary & also a set of build scripts which work well.

once you have the toolchain, by whatever means then it's really just a matter of linking with arm-elf-gcc (or g++ as appropriate) and using -specs=gba.specs for a normal cart image or -specs=gba_mb.specs for a multiboot image.

#24580 - TheGuru - Fri Aug 06, 2004 1:56 pm

I am using devkitARM....I have tried compiling my own gcc as well as just using devkitARM. I think that devkit ARM would work but I don't know how to set up the paths correctly for the specs files so that I can just do -specs=gba.specs or something without having to copy that whole directory over to the current.

#24581 - wintermute - Fri Aug 06, 2004 2:04 pm

you don't need to do anything other than add <path to>/devkitARM/bin to your path. Note, *not* devkitARM/arm-elf/bin

Use arm-elf-gcc or arm-elf-g++ to link *not* arm-elf-ld

#24586 - Abscissa - Fri Aug 06, 2004 3:54 pm

wintermute wrote:
you don't need to do anything other than add <path to>/devkitARM/bin to your path. Note, *not* devkitARM/arm-elf/bin

Use arm-elf-gcc or arm-elf-g++ to link *not* arm-elf-ld


Why not use arm-elf-ld? I've been using it and it seems to work fine.

#24591 - TheGuru - Fri Aug 06, 2004 7:25 pm

Ok, got everything working together :) Thanks wintermute.

TheGuru

#24593 - wintermute - Fri Aug 06, 2004 11:20 pm

Abscissa wrote:
wintermute wrote:
you don't need to do anything other than add <path to>/devkitARM/bin to your path. Note, *not* devkitARM/arm-elf/bin

Use arm-elf-gcc or arm-elf-g++ to link *not* arm-elf-ld


Why not use arm-elf-ld? I've been using it and it seems to work fine.


because ld doeesn't know where the libraries are, which libraries it should be linking or which order they're supposed to be linked in. The drivers (gcc & g++) do and call ld with the proper parameters.

If you're not using standard libraries then in most cases you'll get away with ld but I really don't recommend it.