Date: Thu, 15 Jul 2010 22:36:04 +0400 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: Kostik Belousov <kostikbel@gmail.com> Cc: freebsd-hackers@freebsd.org, Dmitry Krivenok <krivenok.dmitry@gmail.com> Subject: Re: Kernel linker and undefined references in KLD Message-ID: <4C3F5514.70308@yandex.ru> In-Reply-To: <20100715143235.GU2381@deviant.kiev.zoral.com.ua> References: <AANLkTikhrbdbBEFl-I97nBzdvZx6qBaafDUsveRmYyp3@mail.gmail.com> <20100715143235.GU2381@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigD51D48E71C3208D4A04FD9C7
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable
On 15.07.2010 18:32, Kostik Belousov wrote:
> The kernel linker ignores weak attribute of the symbol, as you see.
> There is more bugs in this department, in regard of the list of
> exported symbols from the modules.
>=20
> I have a patch that fixes the issues, but I am leery to commit it, sinc=
e
> the fix effectively breaks significant set of the modules.
Hi, Kostik
i want to remind that some time ago there was a report about another
bug.
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/systm.h>
static int
tst_modevent(module_t mod, int type, void *unused)
{
switch (type) {
case MOD_LOAD:
return (EINVAL);
case MOD_UNLOAD:
break;
};
return (0);
}
static moduledata_t tstmod =3D {
"tst",
tst_modevent,
0
};
DECLARE_MODULE(tst, tstmod, SI_SUB_ROOT_CONF, SI_ORDER_ANY);
# kldload -v ./tst.ko
Loaded ./tst.ko, id=3D16
I think loading of this module should be rejected on MOD_LOAD,
but it doesn't.
--=20
WBR, Andrey V. Elsukov
--------------enigD51D48E71C3208D4A04FD9C7
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
iQEcBAEBAgAGBQJMP1UUAAoJEAHF6gQQyKF67oQH/0xHmFc9+XAFCvqxAxYYyi4O
ngaGasxW34/Jwpu9txBFkY/jeSGCv81ZPi/yfAxP956pbp6Fbv60/eR8gnZhvAnI
6N0KZ/fal9YgGTMwmgiERvF1oz5C4ydpn/MsEEMTk7XbC22KRIiGIZiFWyj9O0Fg
JGcXt7zoMqlI3joSIXmy3W1qiMSjV5Vo1FjcY9ZGomvyfbR3wZL+5HiXG1GQdAOV
SrJrYPvOcRSLev+5/GByueYAKfNR4O0FdF+EJohnrB8RfnCvQE81LlOxmevr4q6T
WzBoNQvNDABmpAzlxDjM0yzVULTXkOEE5OdnObDIh8s5RwLSA+8yXmYCeD3qnfQ=
=pwAX
-----END PGP SIGNATURE-----
--------------enigD51D48E71C3208D4A04FD9C7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C3F5514.70308>
