Re: ndiscvt: Unresolved symbols / kldload if_ndis panic

From: Daniel O'Connor <doconnor_at_gsoft.com.au>
Date: Fri, 27 Aug 2004 12:40:12 +0930
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 26 Aug 2004 19:07, Ulrich Spoerlein wrote:
> I'm trying to get Projet Evil working on this Dell Inspiron 8600 Laptop
> with an Intel Pro Wireless NIC. I tried the XP driver shipped with it
> and the latest offered from Dell, but none works (more below).

I have this exact laptop :)

> I'm running RELENG_5, dmesg and drivers can be obtained from
> http://www.galgenberg.net/~q/freebsd/

Try the instructions I posted here
http://www.gsoft.com.au/~doconnor/I8600/

> I'm trying the following (old and new driver produce the same)
> igor# ndiscvt -O -i /root/ipw_old/W70N51.INF -s /root/ipw_old/W70N51.SYS -o
> ndis_driver_data.h objcopy -I binary -O elf32-i386-freebsd -B i386
> /tmp/ndiscvt.K3zhkM ndis_driver_data.o objcopy --redefine-sym

Hmm, the sole difference appears to be the -O.
[inchoate 12:37] /usr/src/sys/modules/if_ndis >make clean
ndirm -f /usr/src/sys/modules/if_ndis/export_syms if_ndis.ko if_ndis.kld if_ndis.o if_ndis_pci.o if_ndis_pccard.o _at_ machine symb.tmp tmp.o opt_bdg.h bus_if.h device_if.h card_if.h pci_if.h pccarddevs.h
[inchoate 12:37] /usr/src/sys/modules/if_ndis >ndiscvt -O -i w70n51.inf -s w70n51.sys -o ndis_driver_data.h
objcopy -I binary -O elf32-i386-freebsd -B i386 /tmp/ndiscvt.W8zNTe ndis_driver_data.o
objcopy --redefine-sym _binary__tmp_ndiscvt_W8zNTe_start=w70n51_sys_drv_data_start --strip-symbol _binary__tmp_ndiscvt_W8zNTe_size --redefine-sym _binary__tmp_ndiscvt_W8zNTe_end=w70n51_sys_drv_data_end ndis_driver_data.o ndis_driver_data.o
[inchoate 12:37] /usr/src/sys/modules/if_ndis >make
Warning: Object directory not changed from original /usr/src/sys/modules/if_ndis
_at_ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
touch opt_bdg.h
awk -f _at_/tools/makeobjops.awk _at_/kern/device_if.m -h
awk -f _at_/tools/makeobjops.awk _at_/kern/bus_if.m -h
awk -f _at_/tools/makeobjops.awk _at_/dev/pci/pci_if.m -h
awk -f _at_/tools/makeobjops.awk _at_/dev/pccard/card_if.m -h
awk -f _at_/tools/pccarddevs2h.awk _at_/dev/pccard/pccarddevs
cc -O -pipe  -D_KERNEL -DKLD_MODULE -nostdinc -I-   -I. -I_at_ -I_at_/contrib/altq -I_at_/../include -I/usr/include -finline-limit=8000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 -c /usr/src/sys/modules/if_ndis/../../dev/if_ndis/if_ndis.c
cc -O -pipe  -D_KERNEL -DKLD_MODULE -nostdinc -I-   -I. -I_at_ -I_at_/contrib/altq -I_at_/../include -I/usr/include -finline-limit=8000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 -c /usr/src/sys/modules/if_ndis/../../dev/if_ndis/if_ndis_pci.c
cc -O -pipe  -D_KERNEL -DKLD_MODULE -nostdinc -I-   -I. -I_at_ -I_at_/contrib/altq -I_at_/../include -I/usr/include -finline-limit=8000 -fno-common  -mno-align-long-strings -mpreferred-stack-boundary=2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99 -c /usr/src/sys/modules/if_ndis/../../dev/if_ndis/if_ndis_pccard.c
ld  -d -warn-common -r -d -o if_ndis.kld if_ndis.o if_ndis_pci.o if_ndis_pccard.o
touch /usr/src/sys/modules/if_ndis/export_syms
awk -f /usr/src/sys/modules/if_ndis/../../conf/kmod_syms.awk if_ndis.kld  /usr/src/sys/modules/if_ndis/export_syms |  xargs -J% objcopy % if_ndis.kld
ld -Bshareable  -d -warn-common -o if_ndis.ko if_ndis.kld
objcopy --strip-debug if_ndis.ko
[inchoate 12:37] /usr/src/sys/modules/if_ndis >sudo kldunload if_ndis
SSH passphrase:
[inchoate 12:37] /usr/src/sys/modules/if_ndis >sync
[inchoate 12:37] /usr/src/sys/modules/if_ndis >sudo kldload ./if_ndis.ko
kldload: can't load ./if_ndis.ko: No such file or directory
[inchoate 12:37] /usr/src/sys/modules/if_ndis >dmesg | tail
Warning: pid 1052 used static ldt allocation.
See the i386_set_ldt man page for more info
Warning: pid 1051 used static ldt allocation.
See the i386_set_ldt man page for more info
Warning: pid 1057 used static ldt allocation.
See the i386_set_ldt man page for more info
Warning: pid 1060 used static ldt allocation.
See the i386_set_ldt man page for more info
ndis0: detached
link_elf: symbol w70n51_sys_drv_data_start undefined

Ahh, well there you go :)

It works with no -O here.

> Afer running 'kldload if_ndis' I get the kernel message:
> link_elf: symbol W70N51_SYS_drv_data_start undefined
>
> and kldload just sits there for about 60s. top showed that kldload is in
> state 'ndisth'. I then tried 'ps auxl' and got a panic.

Strange, I get an immediate return saying "No such file or directory" because of the missing symbol.
No panic on ps or sysctl either.

I am running 5.2-CURRENT as of the 14th of August.

- -- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBLqYU5ZPcIHs/zowRArU5AJ4ptD9xcAmJBrGmtSkFCcFVVp+z4QCfe6mV
i+U6om4zZYl7Ww7uFZFoXN4=
=82Oi
-----END PGP SIGNATURE-----
Received on Fri Aug 27 2004 - 01:10:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:08 UTC