On Tue, Jun 06, 2000 at 06:12:01PM -0500, Sheldon Hoffman wrote:
> <To [EMAIL PROTECTED]>
> 
> 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?
> 


ld -r -o big.o small1.o small2.o

It is important, however, to make sure that small1.o and small2.o
are compiled with the correct flags and that the .c files include
the correct header files.  Looking at the output of 'make modules'
while compiling a kernel and watching the details really helps.
The sound drivers are especially useful.



dave...

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