Re: modules, insmod and multiple object files

From: Peter Samuelson (peter@cadcamlab.org)
Date: Tue Jan 16 2001 - 07:04:49 EST


[Achim Herrmann]
> main.o was created using language "C": gcc -c main.c -o main.o
> and
> hwaccess.o was created using assembler: nasm -f elf hwaccess.asm -o
> hwaccess.o
>
> Is there a possibility to combine these two object files, so that I
> have a module which is loadable by insmod?

I'm not very familiar with 'nasm', but assuming it produces regular elf
object files:

  $(LD) -r -o {target}.o main.o hwaccess.o

'$(LD) -r' is used lots of places in kernel makefiles already. (Too
many places, actually, most of which could and should be automated.
Kai Germaschewski has recently done some work to this end.)

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 23 2001 - 21:00:12 EST