This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: newlib functions at address 0x0
- From: Nick Clifton <nickc at redhat dot com>
- To: Noé SERRES <noe dot serres at gmail dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Thu, 26 May 2005 09:59:26 +0100
- Subject: Re: newlib functions at address 0x0
- References: <f8bc181b0505260113381ccc3c@mail.gmail.com>
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