Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Mar 2011 15:15:43 +0800
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        freebsd-mips@freebsd.org
Subject:   linker weirdness for MIPS kernel?
Message-ID:  <AANLkTik5Xfk3oPqZVj%2BTCA2b4B53_=xWdZb0g98GPYcD@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi guys,

I'm trying to use modules on my MIPS boards and I'm hitting a snag.

# kldload ./wlan.ko
# kldload ./ath_hal.ko
# kldload ./ath_rate_sample.ko
link_elf_obj: symbol ieee80211_iterate_nodes undefined (1)
linker_load_file: Unsupported file type
kldload: can't load ./ath_rate_sample.ko: Exec format error
# nm ./wlan.ko  | grep ieee80211_iterate_nodes
00015edc t ieee80211_iterate_nodes
# kldstat
Id Refs Address    Size     Name
 1    7 0x80000000 80000000 kernel
 2    1 0xc7b4e000 538e4    wlan.ko
 3    1 0xc7ba2000 70b88    ath_hal.ko
#

So the wlan module is loaded, it has that symbol internally, but the linker
isn't gluing them together. That (1) is a local patch of mine to figure out
where it's broken - here, it's broken in link_elf_obj.c:1038 . Ie, it's the
first loop in relocate_file().

I'm not up to date on how all this ELF and kernel module/linker magic works,
could someone please give me a hand diagnosing why this is happening?

Thanks,



Adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik5Xfk3oPqZVj%2BTCA2b4B53_=xWdZb0g98GPYcD>