Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jul 2008 19:47:02 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        obrien@freebsd.org
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, "cvs-all@freebsd.org" <cvs-all@freebsd.org>, Peter Wemm <peter@wemm.org>
Subject:   Re: svn commit: r180431 - in head/sys: kern sys
Message-ID:  <200807101947.02351.jhb@freebsd.org>
In-Reply-To: <20080710233721.GA55073@dragon.NUXI.org>
References:  <200807101635.m6AGZv7I090311@svn.freebsd.org> <e7db6d980807101035x67390f4cx7ff762e286bc67ed@mail.gmail.com> <20080710233721.GA55073@dragon.NUXI.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 10 July 2008 07:37:21 pm David O'Brien wrote:
> On Thu, Jul 10, 2008 at 10:35:35AM -0700, Peter Wemm wrote:
> > On Thu, Jul 10, 2008 at 9:35 AM, David E. O'Brien <obrien@freebsd.org> 
wrote:
> > > Author: obrien
> > > Date: Thu Jul 10 16:35:57 2008
> > > New Revision: 180431
> > > URL: http://svn.freebsd.org/changeset/base/180431
> > >
> > > Log:
> > >  Allow 'elf_file_t' to be used in a wider scope.
> > >
> > > Modified:
> > >  head/sys/kern/link_elf.c
> > >  head/sys/sys/link_elf.h
> > 
> > This really was intentional.  elf_file_t was supposed to be opaque and
> > changeable.  What do you need this for?
> 
> Juniper needs to be able to call functions in the loadable modules before
> the modules are actually linked into the kernel. This will be used to
> call platform specific initialization functions early in the bootup
> process.  Will also need un-static link_elf_preload_parse_symbols,
> parse_dynamic, symbol_name, link_elf_lookup_symbol,
> link_elf_symbol_values.

Might a better approach be to fix the loader to do the link instead of the 
kernel so that modules loaded via the loader are available from the very 
start of boot.  As it is, it seems that this would be a very fragile thing to 
do (what happens if your platform routines call any other routines that 
aren't already in the module (like printf) that need to have their symbols 
resolved?).

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807101947.02351.jhb>