Page 1 of 1

compiler/linker bug using devkitARM r32 on OSX

Posted: Tue Nov 23, 2010 6:28 pm
by andersemil
I have just compiled all the nds-examples using devkitARM release 32. There seems to be a compiler or linker bug in this release which is evident in at least one of the examples, namely Graphics/3D/nehe/lesson10b. Here's a section of the map file:

Code: Select all

 .bss           0x0201ba70       0x24 nehe10b.o
                0x0201ba70                sector1
                0x0201ba78                texture
                0x0201ba78                xpos
                0x0201ba7c                zpos
                0x0201ba80                walkbias
As you can clearly see, two global ints have been assigned the same address, with the result that the texture of the object shown on the screen changes with the x-position, which is _not_ expected behavior. I suspect it might have something to do with the alignment of the preceding struct 'sector1'.

TIA
Anders Emil

Re: compiler/linker bug using devkitARM r32 on OSX

Posted: Tue Nov 23, 2010 11:22 pm
by WinterMute
I think you're the same person that emailed me recently about the same example?

Turns out it's not a linker problem but a bug in the example that's been fixed in SVN now. I have a few more examples to check then I'll be rolling a new examples tarball release at some point soon.

Re: compiler/linker bug using devkitARM r32 on OSX

Posted: Wed Nov 24, 2010 7:48 am
by andersemil
Yes I quickly realized that it's a bug in the example code. Thanks for updating SVN. It puzzles me though that the compiler does not give a warning when instantiating an array of length zero... but I guess it's standard-compliant, although very unlikely that someone would actually want a zero-length array.

Re: compiler/linker bug using devkitARM r32 on OSX

Posted: Sun Nov 28, 2010 10:01 am
by andersemil
I found the same problem in the input/Touch_Pad/touch_look example, which is based on the same nehe opengl tutorial.

Re: compiler/linker bug using devkitARM r32 on OSX

Posted: Tue Nov 30, 2010 9:05 pm
by WinterMute
Thanks for checking, I've fixed that in SVN now too.