summaryrefslogtreecommitdiffstats
path: root/sys/kern/link_aout.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-11-04 15:20:58 +0000
committerpeter <peter@FreeBSD.org>1998-11-04 15:20:58 +0000
commitabe415781a54116bcd2e4c69d9ae679300c2d482 (patch)
tree8b96a55db8b00f48349d29b47c61019c033ffe05 /sys/kern/link_aout.c
parent7f0987e02d6b66490eb3d84e7441f6e486cc2f7c (diff)
downloadFreeBSD-src-abe415781a54116bcd2e4c69d9ae679300c2d482.zip
FreeBSD-src-abe415781a54116bcd2e4c69d9ae679300c2d482.tar.gz
The handle for the kernel is common. With this fix, ELF kernels can load
a.out kld modules, and a.out kernels can load ELF kld modules.
Diffstat (limited to 'sys/kern/link_aout.c')
-rw-r--r--sys/kern/link_aout.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/kern/link_aout.c b/sys/kern/link_aout.c
index 4d7126a..29b5884 100644
--- a/sys/kern/link_aout.c
+++ b/sys/kern/link_aout.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: link_aout.c,v 1.15 1998/10/25 17:44:51 phk Exp $
+ * $Id: link_aout.c,v 1.16 1998/11/03 14:25:21 peter Exp $
*/
#ifndef __alpha__
@@ -55,13 +55,6 @@ static int link_aout_search_symbol(linker_file_t lf, caddr_t value,
static void link_aout_unload_file(linker_file_t);
static void link_aout_unload_module(linker_file_t);
-/*
- * The file representing the currently running kernel. This contains
- * the global symbol table.
- */
-
-static linker_file_t linker_kernel_file;
-
static struct linker_class_ops link_aout_class_ops = {
link_aout_load_module,
};
@@ -308,8 +301,10 @@ load_dependancies(linker_file_t lf)
/*
* All files are dependant on /kernel.
*/
- linker_kernel_file->refs++;
- linker_file_add_dependancy(lf, linker_kernel_file);
+ if (linker_kernel_file) {
+ linker_kernel_file->refs++;
+ linker_file_add_dependancy(lf, linker_kernel_file);
+ }
off = LD_NEED(af->dynamic);
OpenPOWER on IntegriCloud