Why don't you peek the Rules.make of kernel source package ?
You can use 'ld' to make a single loadable object from many 'o' files.
Let me give you an example.
If you are trying to build a module named 'mymodule.o' 
with 'object1.o', 'object2.o', and 'object3.o' then
the following command can be used.

ld  -r -o module.o object1.o object2.o object3.o 

Bye.

----- Original Message ----- 
From: "Sheldon Hoffman" <[EMAIL PROTECTED]>
To: "rtlinux" <[EMAIL PROTECTED]>
Sent: Wednesday, June 07, 2000 8:12 AM
Subject: [rtl] Many .O files to one loadable .O module with GCC?


> <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?
> 
> ___________________________
> Shel Hoffman
> 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/
> 
-- [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