Page 1 of 1

Staticly link newlib with kernel?

Posted: Sun Nov 16, 2008 9:40 am
by andreasjonsson
Hi!

Im trying to get a C lib staticly linked with my kernel. I followed the toolchain tutorial on the wiki to get newlib compiled. And after a week I got it working. :)

Now I'm stuck... realy stuck... Im getting undefined references (to fopen memcpy etc.) when linking it all together using ld. Just when I thought the hard part was over. :)

So basicly I just want to ask if I'm trying to do something thats not posible.

I thought.. I just could include the newlib headers when compiling the kernel. Then use ld -l /mylib/libc.a when linking all kernel object files.

Do I need to do something more?
Maby it is not that easy.. :)

Re: Staticly link newlib with kernel?

Posted: Sun Nov 16, 2008 11:11 am
by furryfreak
what format are the object files? I had a similar problem recently when trying to link an a.out object with an elf object, that could be the problem, if not I ain't got a clue.

--freak

Re: Staticly link newlib with kernel?

Posted: Fri Nov 21, 2008 2:46 am
by andreasjonsson
Yes... guess you were right.

I updated gcc, binutils and newlib and did every thing from scratch. Now I don't have that issue any more. Guess it was just a fuckup from my side. :(

tnx.