lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071128105900.GA16537@uranus.ravnborg.org>
Date:	Wed, 28 Nov 2007 11:59:00 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	murtuja bharmal <murtuja_bharmal@...oo.com>
Cc:	linux-kernel@...r.kernel.org,
	linux-kbuild <linux-kbuild@...r.kernel.org>
Subject: Re: Linux 2.6 kernel module compilation without using KBUILD

> 
> My intention is  to just understand whole  
> process of making kernel module.

The short story....
kbuild knows that .o files listed with obj-m are modules.
So if you have:
   obj-m := foo.o

the kbuild will know that it has to build a module named foo.o.
If foo.o consist of composite objects then kbuild
is told so using:
    foo-y := bar.o baz.o

So in this case kbuild will build bar.o and baz.o and
use these for the resulting module named foo.

When building baz.o kbuild uses make to search for the source file.
First it look for baz.c - if it fails it look for baz.s
Does both fail kbuild give up (there are some corner cases but ignore that).

When foo.o is ready is uses some linker magic to link in version information
and the end result is foo.ko.

foo.ko has a number of unresolved symbols that are:
1) during build time checked if kernel or other modules define them
2) during load time they are resolved

The above is general stuff - if you need more details please be specific.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ