This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: newlib functions at address 0x0


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: binutils@sources.redhat.com or else the gcc mailing list (for the compiler) at: gcc-bugs@gcc.gnu.org.


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.

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]