Re: modules, insmod and multiple object files

Peter Samuelson (peter@cadcamlab.org)
Tue, 16 Jan 2001 06:04:49 -0600


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