<To [EMAIL PROTECTED]>


Dear Pavel Andris,

>> We are using Red Hat 6.1 on a pentium 233 Mhz with
>> Linux version 2.2.14-rtl2.2 (gcc version egcs-2.91.66
>> 19990314/Linux (egcs-1.1.2 release)) #4 Sat May 20 08:52:04 CDT 2000
>> 
>> We are hoping to build a single loadable (INSMOD module compatible)
>> object module for RTLinux.  The project consists of many (> 50) .C
>> files and associated .H files.
>> 
>> We plan to use MAKE to compile each .C + .H file separately to a .O
>> file then build the final .O loadable module from all the individual
>> .O files.
>> 
>> We can't figure out how to get GCC to accept a number of .O files
>> and create a single .O file that can be loaded into RTLinux with INSMOD.
>> 
>> Can anyone suggest how we can build a single .O loadable module from
>> many .O files that were individually compiled using GCC?
>
>What you need is partial linking (ld -r). My own example follows:
>
>ld -r ./obj/dspgm.mo ./obj/radic.mo ./obj/bankar.mo ./obj/insfil.mo 
>./obj/ruovl.mo ./obj/kinem.mo ./obj/konst.mo ./obj/prmul.mo ./obj/invul.mo 
>./obj/algeb.mo ./obj/affix.mo ./obj/chybnik.mo ./obj/vykfo.mo 
>./obj/syntax.mo ./obj/sensor.mo ./obj/host.mo ./obj/declare.mo 
>./obj/move.mo ./obj/inter.mo ./obj/synch.mo ./obj/begend.mo 
>./obj/savloa.mo ./obj/ttdrv.mo ./obj/display.mo ./obj/tabul.mo 
>-L/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66 -L/usr/lib -L../../libobjs 
>-lmodn -lm -lgcc -M -o robol.m > ./maps/robol.m.map
>
>where 
>
>./obj/*.mo          are separately compiled objects (I use .mo instead of .O)
>-L<something>       library path
>-l<something>       name of the library to be linked with
>robol.m             name of the loadable module (result of linking)
>./maps/robol.m.map  name of the map        

THANK YOU so much for taking the time to answer my query!  I've spent
a week trying to track this down looking on the web and in various
books.

I have worked in the DOS/Windows environment for many years and am
now just getting started with RTLinux (by porting a real-time
application.)  I am so impressed with this Linux "community"  - Never
in my life have I ever been able to get such detailed help from
Microsoft and they charge to the gills for their "support"!  I am
eager to get up to speed so that I can become a contributer to the
Linux community.

Thanks again for caring enough to help!

___________________________
Shel Hoffman
Reflective Computing
917 Alanson Dr
St. Louis, MO 63132 USA
(314) 993-6132 voice
(314) 993-3316 fax
[EMAIL PROTECTED]


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