Hello.
This is the problem about static linking ...
From: Kay-Ulrich Scholl <[EMAIL PROTECTED]>
Subject: Re: [rtl] how to use sin() or exp() from math.h in rtl?
Date: Tue, 02 Feb 1999 08:23:49 +0100
Message-ID: <[EMAIL PROTECTED]>
> Hideto Ishibashi wrote:
...
> > David J. Christini posted the following message:
> >
>
> > You need to use `gcc' with a `compile only option(-c)'.
> > And then, use `ld' for linking with these parameters:
> > `-L/usr/lib -r -Bstatic -lc -lm'.
...
> I used your options and got the following messages on insmod:
>
> rt_module: unresolved symbol __divdi3
> rt_module: unresolved symbol fputs
> rt_module: unresolved symbol __assert_fail
I think that __divdi3 is required when you divide or divide by
`long long' type variables. For example, dividing RTIME by RTIME.
I wonder why you use the fputs function in the kernel module code.
It can use the lower level i/o **system call**, write().
Does it work correctly?
> To eliminated the last two lines I used the option
> -static instead of -Bstatis (BTW: what's the difference?)
I don't know why you can't use -Bstatic. I have thought that
both options(-static and -Bstatic) have the same effects.
But it doesn't, according to your result.
Is it because of a difference of gcc versions?
But I use the gcc version 2.7.2.3. I think this is the same
one as yours (as follows).
> The solve the __divdi3 -problem I added
> -L/usr/lib/gcc-lib/i486-linux/2.7.2.3/ -lgcc.
Bye,
Hideto Ishibashi
// Hideto Ishibashi <[EMAIL PROTECTED]>
// http://vip.cis.kurume-nct.ac.jp/~s34204/
// Kurume National College of Technology, Japan
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/