cvs commit: src/sys/kern link_elf_obj.c

Peter Wemm peter at wemm.org
Fri Apr 30 09:36:35 PDT 2004


On Friday 30 April 2004 09:32 am, Peter Wemm wrote:
> peter       2004/04/30 09:32:40 PDT
>
>   FreeBSD src repository
>
>   Modified files:
>     sys/kern             link_elf_obj.c
>   Log:
>   Checkpoint commit for an alternative WIP kernel module loader that
> isn't as dependent on binutils features/quirks as the current one. 
> This one loads plain .o files without having to mess with shared
> object mode.
>
>   This happens to be essential on amd64, because binutils hasn't
> implemented all the quirks/features that we need for producing the
> hack non-PIC shared objects.  As it turned out, .o format isn't all
> that inconvenient after all.  It looks like the ability to use the
> same .o files for linking directly into a static kernel or loading as
> a module might be worth it.
>
>   It is still very much a work-in-progress, but it is almost usable. 
> Other changes are still needed in order to use it though, these have
> not been committed yet.  There is still a memory corruption/overrun
> bug somewhere. For example, test modules load and work, but the
> machine explodes a few minutes later in vm_forkproc() or the like. 
> Notable missing things include kldxref support, and loader(8)
> support.  I wanted to figure out a working baseline set of code
> first.

If anybody is interested in the glue to connect this, have a look at:
 http://people.freebsd.org/~peter/kld.diff
There are a few problems with that diff, so it isn't ready to be 
committed yet.  In particular, it changes the .ko format for all 
platforms instead of just amd64, and enables the object loader on all 
platforms instead of just amd64 for now.

-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


More information about the cvs-all mailing list