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 > linker warning about _kill_r

#67087 - bananaboy - Sun Jan 15, 2006 12:42 pm

Hi,

I keep getting the following linker warning:

e:/tools/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwork\libc.a(signalr.o): In function `_kill_r':
: warning:

and nothing else! There is no actual warning text.. Previously I was getting an error in the same function about .bss not fitting in ewram or something, but I've sorted that out. Unless this is another symptom of too much code/data. Although I estimated that code+data should only come to about 2Mb now.

If I use -g in my link line I get libg instead of libc:

e:/tools/devkitpro/devkitarm/bin/../lib/gcc/arm-elf/4.0.2/../../../../arm-elf/lib/thumb/interwork\libg.a(signalr.o): In function `_kill_r':
: warning:

Anyone know what this is about?

cheers
sam

edit: forgot to mention: this is using the latest devkitpro

#67237 - rmt38 - Mon Jan 16, 2006 11:03 am

I get three of these warnings for different functions, when trying to cross-compile Python to the Nintendo DS. It seems rather expected that on a system with no OS, the functions provided in the c lib that have no support because of that would throw warnings - and in my case it was pretty much harmless.

#67239 - bananaboy - Mon Jan 16, 2006 12:18 pm

Thanks for the reply!

Yeah, my code still seems to run fine.

The samples that come with libnds don't give this warning though, and I'm using a slightly modified version of the Makefile from the samples. Oh well!

#67240 - wintermute - Mon Jan 16, 2006 12:24 pm

There are a few functions in the newlib patches which are stubbed, including _kill_r_ which use a feature of the linker to display a warning that they do nothing. Unfortunately stripping debug info from the libraries removes the warning text so all you get is the : waning: part.

The stubs just return an error and do nothing so don't have any effect other than allowing code which uses unimplemented functions to link.

Your map file should tell you which code is attempting to use the stub functions.

#67243 - bananaboy - Mon Jan 16, 2006 1:11 pm

Ahhh, the map file! Found the problem.. I'm porting some code, and it raises a signal! That was causing it to link it in.

Cheers guys!