[Bug 208464] [svr4] svr4.ko fails to load due to not finding symbol svr4_delete_socket even though it is present in same module
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Apr 2 07:16:26 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208464
Bug ID: 208464
Summary: [svr4] svr4.ko fails to load due to not finding symbol
svr4_delete_socket even though it is present in same
module
Product: Base System
Version: 10.2-RELEASE
Hardware: i386
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: ske-89 at pkmab.se
CC: freebsd-i386 at FreeBSD.org
CC: freebsd-i386 at FreeBSD.org
When I try to "kldload svr4.ko" I get this error:
link_elf: symbol svr4_delete_socket undefined
KLD svr4.ko: depends on streams - not available or version mismatch
kldload: can't load svr4: No such file or directory
This would appear to say that streams.ko might need to be loaded before svr4.ko
to provide the symbol svr4_delete_socket. That is not correct, though. Loading
streams.ko also complains that svr4_delete_socket is undefined.
Checking the revision histories and source code for svr4.ko and streams.ko, I
noticed that svr4_delete_socket() was moved from streams.c to svr4_socket.c in
July 2006. https://svnweb.freebsd.org/base?view=revision&revision=160558
So now svr4_delete_socket is an internal symbol of the svr4.ko module.
So link_elf shouldn't need to import it at all when loading svr4.ko.
There seems to be some mixup regarding which module this symbol belongs to.
Next thing I noticed is that there is still an "EXPORT_SYMS=svr4_delete_socket"
in the Makefile for the streams module, where the symbol does no longer exist.
And there is no such EXPORT_SYMS in the Makefile for the svr4 module, where the
symbol currently lives. I would assume this should have been moved together
with the source code for svr4_delete_socket(), but was overlooked.
https://svnweb.freebsd.org/base/head/sys/modules/streams/Makefile?view=markup
https://svnweb.freebsd.org/base/head/sys/modules/svr4/Makefile?view=markup
I'm not experienced enough with FreeBSD kernel source to know for sure if this
is really the whole story, but to me it seems like a good explanation for the
bug. I don't see any other mention of svr4_delete_socket when searching the
source code, that would explain this symtom.
Can we get this fixed, so svr4.ko and streams.ko can be loaded again?
It seems a pity having such a simple bug preventing their use.
I'm not equipped to try to fix this myself, otherwise I would.
- I tried this out on FreeBSD-10.2-RELEASE-i386-bootonly.iso and
FreeBSD-10.1-RELEASE-i386-bootonly.iso.
The same problem occurs also with 8.0-RELEASE-i386-livefs.iso, except there you
need to check dmesg to see the message from link_elf.
Given the explanation and date above, I would assume the same occurs in release
7 too, but I didn't test it.
I have also discussed this in the forum thread
https://forums.freebsd.org/threads/55617/
I didn't find any previous problem reports about this.
There have been various forum discussions mentioning not being able to use
these modules on various releases, but not very detailed.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-i386
mailing list