newlib functions at address 0x0

Nick Clifton
Thu May 26 08:58:00 GMT 2005

Hi Noé,

> I am trying to link a small program using newlib.

   This is probably a linker problem or possibly a compiler problem, so 
it would be better if you sent this bug report to the binutils mailing 
list (for the linker) at: or else the gcc 
mailing list (for the compiler) at:

> I implemented a sine function (for example) in my main().
> I specified the "-lm" option for the compiler and linker in my makefile.
> The problem is that the sine code is located at address 0, where my
> reset vectors should normally be! annoying!
> What am I doing wrong? Should I specify something in the linker command file? 

What command line are you using to:

   a) compile your sine function ?
   b) link your compiled sine function into an executable ?

Are you using a customised linker script ?  If so then this could be the 
cause of your problems.

> Note: my config: powerpc-eabi GNU toolsuite for a powerpc MPC5200. using Cygwin.

Which version of the compiler and linker are involved ?

Are you able to create a *small* self-contained test case which 
reproduces this problem ?  If so that would greatly help somebody track 
down and fix the bug.


More information about the Newlib mailing list