problems in linking
P.S.Ravi Kiran
psrk@cdotb.ernet.in
Mon Sep 25 02:55:00 GMT 2000
gcc version - 2.95.2
binutils -2.9.1
newlib -1.8.2
configuration options-- from config.status file
../src/configure
--with-gcc-version-trigger=/home/psrk/temp/src/gcc/version.c
--host=i686-pc-linux-gnu --target=m68k-coff --prefix=/home/psrk/m68k -v
--norecursion
I got the binaries correctly and also I could compile my files
well. but when linking, it is giving the following errors in
the compiler sources.
/home/psrk/temp/build/m68k-coff/libgloss/m68k/../../../../src/libgloss/m68k/../open.c:28:
undefined reference to `__errno'
/home/psrk/m68k/m68k-coff/lib/libidp.a(lseek.o): In function `lseek':
/home/psrk/temp/build/m68k-coff/libgloss/m68k/../../../../src/libgloss/m68k/../lseek.c:28:
undefined reference to `__errno'
can u please tell me what I can do with that error ?
And also there is one more problem that I have a function
written in C like this.
int disable()
{
register temp;
asm(" move.w %sr,temp");
asm(" andi #61695,%sr");
return(temp);
}
The compiler is not giving any warning, but the linker says
"undefined refarence to temp " in the asm statement.
I tried with _temp and it says
"undefined refarence to _temp "
I have some more functions written in assembly that the linker
was un-able to link them to C functions.
So please help me in resolving these
Thank you......
bye........
--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| P.S.Ravi Kiran |
| C-DOT, 71/1 Miller Road, |
| BANGALORE -52. |
| Ph. 091-080-2263399,ext-292 |
\ email: psrk@cdotb.ernet.in /
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the Newlib
mailing list