Hello, all.
Thank you for your reply, David.

From: David Olofson <[EMAIL PROTECTED]>
Subject: Re: [rtl] Re: Object Oriented programming and RTLinux
Date: Mon, 22 Feb 1999 12:38:47 +0100
Message-ID: <[EMAIL PROTECTED]>

> > How do I need to specify the options at linking?
> > Please tell me the options for `ld', which you use in your
> > Makefile/command line.
> >
> > In fact, I try to do it with my code, but I failed.
> > Although the compile and link are success, I got errors
> > at loading with insmod. The errors are something like;
> > unreferrenced symbol __eh_pc, __rtti_user, __throw.
> (...)
> 
> Depends on what you are linking, but here's the basics of my
> makefile...
> 
> #--------------------------------
> INC = /usr/src/rtl/include
> DINC = /home/src/proj/include
> CB = /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtbegin.o
> CE = /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/crtend.o
> CF = -O2 -Wall
> 
> mod_tmp.o:    mod.cc mod.h
>               g++ -I${DINC} -I${INC} ${CF} -D__KERNEL__ -D__RT__ -c mod.cc -o
> mod_tmp.o
> 
> mod.o:                mod_tmp.o
>               ld -Ur -static -o mod.o $(CB) mod_tmp.o $(CE) -L/usr/lib -lm
> -L/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/ -lgcc -lg++
> #--------------------------------
> 
> Note that $(CB) most be linked in before all .o-files with
> ctors/dtors, and $(CE) after them. This is how
> __do_global_ctors_aux() and __do_global_dtors_aux() gets
> to know what to do. Also, note that some functions in libmath,
> libgcc and libg++ cannot be used, as they will require linking
> in functions not useble from within modules! You may provide
> your own "kernel friendly" replacements for those functions,
> if necessary.

I understood it. Thank you so much.

And I found my problem(the errors I got from gcc) is resolved by
compiling options: '-fno-exceptions', '-fno-rtti'(gcc/g++ 2.7.2.3).
This information is wrote in info document, g++FAQ.info.

Actually I'm working on RT versions of the C allocation functions
malloc()/free() and C++ operator new/new[]/delete/delete[]
(although it'll be possibly a bit different from the ISO/ANCI
C/C++ standard). It looks working well at non-RT debugging with gdb.
So I think it's almost to work on RT-Linux.

I think it'll be finished, at worst, by the end of the March.
And I'm going to report when it's finished.

Regards,
Hideto

// 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/

Reply via email to