From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 15 18:36:24 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 565F81065670 for ; Thu, 15 Jul 2010 18:36:24 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward12.mail.yandex.net (forward12.mail.yandex.net [95.108.130.94]) by mx1.freebsd.org (Postfix) with ESMTP id 005C68FC27 for ; Thu, 15 Jul 2010 18:36:23 +0000 (UTC) Received: from smtp11.mail.yandex.net (smtp11.mail.yandex.net [95.108.130.67]) by forward12.mail.yandex.net (Yandex) with ESMTP id 325F022103A6; Thu, 15 Jul 2010 22:36:22 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1279218982; bh=grgceZ81OJ5sssnBhk2+DzFm0sv1S3OZKqT6DKl7pQg=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=NCW1LWOkkL8xdaXSaiHHYwZeb4n914OhdOQ8TgjjOJvMDnD/Gy2o0oAHlrr91D5fl pINVFqKsRPe63+S3IC3/HYf9LIA8XbiVzlLCJAqZs/WJKBv2z6BA4Botz6omn5jYo/ zbtupu1TBZ+EEkFjYtiU1M+dEhmi/iuTKoDqVM6A= Received: from [10.43.163.197] (static-76-197.kirovnet.ru [92.39.76.197]) by smtp11.mail.yandex.net (Yandex) with ESMTPSA id DD0DA44D8070; Thu, 15 Jul 2010 22:36:21 +0400 (MSD) Message-ID: <4C3F5514.70308@yandex.ru> Date: Thu, 15 Jul 2010 22:36:04 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100611 Thunderbird/3.0.4 MIME-Version: 1.0 To: Kostik Belousov References: <20100715143235.GU2381@deviant.kiev.zoral.com.ua> In-Reply-To: <20100715143235.GU2381@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD51D48E71C3208D4A04FD9C7" X-Yandex-TimeMark: 1279218982 X-Yandex-Spam: 1 X-Yandex-Front: smtp11.mail.yandex.net Cc: freebsd-hackers@freebsd.org, Dmitry Krivenok Subject: Re: Kernel linker and undefined references in KLD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jul 2010 18:36:24 -0000 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 #include #include #include 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--