Staticly link newlib with kernel?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
andreasjonsson
Posts: 2
Joined: Sun Nov 16, 2008 9:12 am

Staticly link newlib with kernel?

Post 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.. :)
User avatar
furryfreak
Member
Member
Posts: 28
Joined: Mon Nov 03, 2008 12:45 pm
Location: SW England

Re: Staticly link newlib with kernel?

Post 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
andreasjonsson
Posts: 2
Joined: Sun Nov 16, 2008 9:12 am

Re: Staticly link newlib with kernel?

Post 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.
Post Reply