How to compile multi-source module?

How to compile multi-source module?

Post by Chris Harr » Wed, 25 Dec 1996 04:00:00



Hello --

I'm writing a loadable kernel module, and have created two c files for
it, foo_main.c and foo_audio.c.  I'd like to compile and link these
two into a single foo.o that I could add to the kernel with insmod.  I
don't, however, seem to be able to stumble upon the right gcc/ld
combination to do this.  It seems like I need something like gcc -c
foo_main.c foo_audio.c, except where -c is something that links
foo_main and foo_audio together before producing the finally,
not-really-linked output.  Any ideas?  Are there any good intros out
there to compiling modules, shared libs and other items that aren't
executables?

Thanks!

-Chris

 
 
 

How to compile multi-source module?

Post by Sander van Malss » Wed, 25 Dec 1996 04:00:00



> Hello --

> I'm writing a loadable kernel module, and have created two c files for
> it, foo_main.c and foo_audio.c.  I'd like to compile and link these
> two into a single foo.o that I could add to the kernel with insmod.

Use something like "ld -r foo.o bar.o -o module.o" (the -r is the
important bit).

Shared libs in its simplest form are created with "gcc -shared -o
libfoo.so *.o" (don't forget to compile them first with "gcc -fPIC").

svm
--


 
 
 

1. ? multi home + multi cgi, multi email, multi log, multi support

Is there any httpd package that could do not only multi web-home
setup, but also
        email for multi-doamin-names with their own domain-name;
        store log files for each domain-name in their own location;
        setup cgi-bin for each domain-name to have their own directory;
        support autherization and configuration for their own home
?

Does Netscape do that, OpenMarket do that, Or otehrs?

Thanks,

zhao

2. Solaris X86 2.4 Openwindows problems....

3. Multi-Source Posts

4. Missing libvga.so.1?

5. linux kernel compile to include some module source?

6. using expect with cu on Linux?

7. monolithic kernel and source that can only be compiled as a module

8. Drop in HD performance after an upgrade to OSE 5

9. Source files compiled. Why no loadable module?

10. linux kernel compile, with new module source?

11. How to disable certain modules when compiling from source

12. Compiling individual kernel modules from the kernel source tree

13. Module deps when building stacked module outside of kernel source tree