Support gzipped modules. (partial patch)

2009-05-13 00:39:08来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

Support gzipped modules
>Number:         53506
>Category:       kern
>Synopsis:       Support
gzipped modules. (partial patch)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 19 10:50:09 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Peter Edwards
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
>Environment:

System:
FreeBSD rocklobster 5.1-CURRENT FreeBSD 5.1-CURRENT #5: Thu Jun 19
10:20:09 IST 2003
nfs@archie:/pub/FreeBSD/obj/pub/FreeBSD/current/src/sys/ROCKLOBSTER i386
>Description:
A recent mail to -current suggested that "fixing up imgact_gzip"
would allow compressed kernel modules. No one really said much about
the idea, but I had recently been mucking about with "inflate.c"
and image activators for two unrelated hacks, so knew enough about
ELF and gzip to whip a very naiive implementation of this together.
This patch was originally posted to -current in Message-Id:
(Which was in response to Message-Id
, although this
was not recorded by the mailer I used, which, unfortunately, I have
no control over.)
There are a couple of weaknesses with the patch:
1: It doesn't support pre-loaded files (that would require extra
support in the loader.) This, for example, means ACPI won't work
under it, because it needs to be loaded by the loader, rather than
the kernel.
2: It inflates the content of the gzipped image into memory. This
means that for the brief period of the loading of the module, the
memory usage could be quite high (most of the image will end up
loaded anyway, but that doesn't excuse the waste.). The kernel
linker could be modified to ensure it only ever reads forwards in
a file, which would allow a more optimal implementation.
3: Dependency loads aren't great. Eg, loading snd_maestro3.ko.gz
will probably fail unless you load snd_pcm.ko.gz first, because the
dependency resolver tries to load it as snd_pcm.ko. This is probably
trivial to fix.
I'm posting the patch in its incomplete state to record it for

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD桌面应用笔记

下一篇:在Linux AS 2.1环境下安装Oracle 9.2.0.4