compiler/linker bug using devkitARM r32 on OSX

Post Reply
andersemil
Posts: 3
Joined: Tue Nov 23, 2010 6:17 pm

compiler/linker bug using devkitARM r32 on OSX

Post by andersemil » Tue Nov 23, 2010 6:28 pm

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

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

Re: compiler/linker bug using devkitARM r32 on OSX

Post by WinterMute » Tue Nov 23, 2010 11:22 pm

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.
Help keep devkitPro toolchains free, Donate today

Personal Blog

andersemil
Posts: 3
Joined: Tue Nov 23, 2010 6:17 pm

Re: compiler/linker bug using devkitARM r32 on OSX

Post by andersemil » Wed Nov 24, 2010 7:48 am

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.

andersemil
Posts: 3
Joined: Tue Nov 23, 2010 6:17 pm

Re: compiler/linker bug using devkitARM r32 on OSX

Post by andersemil » Sun Nov 28, 2010 10:01 am

I found the same problem in the input/Touch_Pad/touch_look example, which is based on the same nehe opengl tutorial.

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

Re: compiler/linker bug using devkitARM r32 on OSX

Post by WinterMute » Tue Nov 30, 2010 9:05 pm

Thanks for checking, I've fixed that in SVN now too.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests