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 > Upgrading devkitpro, linker errors

#161499 - ingramb - Tue Aug 05, 2008 3:52 am

I'm trying to upgrade my project from r20 to the latest version of devkitpro, and I get the following linker error:

"section .sbss [02020c0c -> 02023013] overlaps section .itcm [02020c0c -> 020281f3]".

Looking at the map file, both my itcm and sbss sections seem to be within range.

Any ideas as to what changed since r20 that could cause this?

#161539 - ingramb - Wed Aug 06, 2008 2:53 am

I'm looking at my map file more closely, and I have this:

.itcm 0x01000000 0x75e8 load address 0x02020c0c
...
.sbss 0x0b000020 0x2408 load address 0x02020c0c

I think this is the problem...the itcm and the sbss have the same load address. But the sbss shouldn't even have a load address right? It's just zero-filled memory.

[EDIT]
Looking at my old map file, the sbss doesn't have a load address.

Any insights given this new information?

#161576 - tepples - Wed Aug 06, 2008 7:18 pm

As I understand it, the load address of a section that doesn't get loaded might just be identical to the load address of the section next to it in some config file. In this case, .../devkitarm/arm-eabi/lib/ds_arm9.ld specifies .dtcm, .itcm, .sbss, and .bss one after another.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#161607 - ingramb - Thu Aug 07, 2008 4:38 am

I've tried building some small test cases using the newest version of devkitpro, and none of them show a load address for the sbss section. Only my project does. I've upgraded my makefiles to the latest template versions. I've tried removing all DTCM_BSS variables, and then slowly adding them back one by one. It doesn't matter. As soon as ANYTHING goes into the sbss section, my map file shows:

.sbss 0x0b000020 0x2200 load address 0x02022854

And I get linker errors. Every other test case I've tried comes up as:

.sbss 0x0b000020 0x****
(notice no load address)

I'm about ready to throw my laptop out the window.