]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for kernel modules with a single PT_LOAD section.
authorPeter Wemm <peter@FreeBSD.org>
Mon, 17 Oct 2005 23:21:55 +0000 (23:21 +0000)
committerPeter Wemm <peter@FreeBSD.org>
Mon, 17 Oct 2005 23:21:55 +0000 (23:21 +0000)
commit1a330eb01d1a0f21d5d1a0f0723aeaf12c76f9ac
treed6da7bdfc7d482f5346ad9862fa6ace2db1f5424
parent9313eb55376e4d020a074d00a84ec212c01a23d7
Add support for kernel modules with a single PT_LOAD section.

While here, support up to four sections because it was trivial to do
and cheap. (One pointer per section).

For amd64 with "-fpic -shared" format .ko files, using a single PT_LOAD
section is important to avoid wasting about 1MB of KVM and physical ram
for the 'gap' between the two PT_LOAD sections.  amd64 normally uses
.o format kld files and isn't affected normally.  But -fpic -shared modules
are actually possible to produce and load...  (And with a bugfix to
binutils, we can build and use plain -shared .ko files without -fpic)

i386 only wastes 4K per .ko file, so that isn't such a big deal there.
sys/kern/link_elf.c