[Date Prev][Date Next] [Chronological] [Thread] [Top]

[rtl] Re: unresolved symbol __divdi3




>From the rtl archives...

Phil Wilshire <philwil@on-ramp.ior.com> wrote:
> I am working on either including
> /usr/lib/gcc-lib/i386-glibc20-linux/egcs-2.90.29/libgcc.a in my links
> or getting the code out of egcs and using that.

I just ran into this same problem and found this little trick:

   File: gcc.info,  Node: Debugging Options, ...
   ...
   `-print-libgcc-file-name'
	Same as `-print-file-name=libgcc.a'.

	This is useful when you use `-nostdlib' or `-nodefaultlibs' but
	you do want to link with `libgcc.a'.  You can do

	     gcc -nostdlib FILES... `gcc -print-libgcc-file-name`

So,

   ld -r module.o.tmp -o module.o `gcc -print-libgcc-file-name`

will link with libgcc in a system-independent manner.

Has anyone looked at the code from libgcc?  It shouldn't be hard to
reproduce the code in an inline function. It comes up often due to the
64-bit RTIME values, so maybe it would be appropriate to include in
rtlinux proper.

<Joe
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/