tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kernel symbol redefined messages



With a kernel built from today's sources (updated via anoncvs on 2016-06-05 at 13:29:32 UTC), I'm seeing the following messages when loading the iic and bpf modules, resulting in load failure:

kobj_checksyms, 913: [%M/iic/iic.kmod]: linker error: global symbol `i2c_bitbang_read_byte' redefined
kobj_checksyms, 913: [%M/iic/iic.kmod]: linker error: global symbol `iicbus_print' redefined
kobj_checksyms, 913: [%M/iic/iic.kmod]: linker error: global symbol `i2c_bitbang_send_start' redefined
kobj_checksyms, 913: [%M/iic/iic.kmod]: linker error: global symbol `i2c_bitbang_initiate_xfer' redefined
kobj_checksyms, 913: [%M/iic/iic.kmod]: linker error: global symbol `i2c_bitbang_send_stop' redefined
kobj_checksyms, 913: [%M/iic/iic.kmod]: linker error: global symbol `i2c_bitbang_write_byte' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `bpf_create' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `bpf_filter' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `bpf_destroy' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `bpf_validate_ext' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `m_xhalf' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `bpf_validate' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `m_xword' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `bpf_set_extmem' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `bpf_set_cop' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `bpf_filter_ext' redefined
kobj_checksyms, 913: [%M/bpf/bpf.kmod]: linker error: global symbol `m_xbyte' redefined

Many other modules are loaded without any error, so this is not a "global" problem, but it is a problem none-the-less. In particular, the failure to load bpf means that dhcpcd doesn't run!

I'm suspecting (rather strongly!) that this is a result of my commit of the fix for PR/45125 [1].

The symbols really are multiply defined, in both the kernel (which includes a built-in copy of i2cexec) and in the iic module. For example,

	# nm $OBJDIR/obj/sys/arch/amd64/conf/POKEY/netbsd | \
	? grep i2c_bitbang_read_byte
	ffffffff80261bd8 T i2c_bitbang_read_byte
	#  nm $DESTDIR/amd64/stand/amd64/7.99.30/modules/iic/iic.kmod | \
	? grep i2c_bitbang_read_byte
	0000000000000f38 T i2c_bitbang_read_byte
	#
	# nm $OBJDIR/amd64/sys/arch/amd64/compile/POKEY/netbsd | \
	? grep bpf_create
	ffffffff80389510 T bpf_create
	# nm $DESTDIR/amd64/stand/amd64/7.99.30/modules/bpf/bpf.kmod | \
	? grep bpf_create
	0000000000002bf0 T bpf_create
	#

So I am quite reluctant to revert the patch, as that patch actually appears to be working correctly!

ISTM that the correct solution is to determine why the symbols are redefined, and to prevent that! But I don't have a clue yet.

FWIW, this issue would/should only affect users who are actually using separately-loaded modules. As far as I've been able to determine, this means that ~99.99% of our users are unaffected by this problem. (It seems that I am one of only a very few people who actually use a "highly modularized" system.)

Further clue and/or guidance is requested!


[1] http://mail-index.netbsd.org/source-changes/2016/05/31/msg074994.html




+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index