Subject: kern/14498: NetBSD doesn't support ELF symbol for loadable kernel modules
To: None <gnats-bugs@gnats.netbsd.org>
From: None <wesley.chen@cacheflow.com>
List: netbsd-bugs
Date: 11/07/2001 13:42:20
>Number: 14498
>Category: kern
>Synopsis: NetBSD doesn't support ELF symbol for loadable kernel modules
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 07 13:43:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Wesley Chen
>Release: 1.5.2 i386
>Organization:
Cacheflow, Inc.
>Environment:
NetBSD cello 1.5.2 NetBSD 1.5.2 (cello) #15: Mon Nov 5 16:34:18 PST 2001
>Description:
Currently, the "modload" command and the 1.5.2 kernel, do not support
ELF symbols for loadable kernel modules. The implementation was left
blank in the codes of "modload". This is very inconvenient to kernel
developers.
>How-To-Repeat:
The following is an example for reproducing this problem:
1. Compile the kernel without cd9660 support.
2. Build the cd9660 module.
3. Reboot the system with the new kernel.
4. load the cd9660 kernel module with "modload".
5. make sure the module is loaded properly using "modstat"
5. Break into to ddb, and search for "cd9660_lkmentry" using "sifting"
command. The symbol is not found.
>Fix:
Files changed in my implemetation:
usr/src/sbin/modload/modload.c
usr/src/sbin/modload/modload.h
usr/src/sbin/modload/elf.c
usr/src/sys/ddb/db_elf.c
usr/src/sys/ddb/db_sym.c
I've created a tgz file at (anonymous ftp):
ftp://ftp.cacheflow.com/get/11-07-NetBSD/elf_sym.tgz
>Release-Note:
>Audit-Trail:
>Unformatted: