From owner-freebsd-stable@FreeBSD.ORG Thu Jan 17 03:40:49 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263DA16A421 for ; Thu, 17 Jan 2008 03:40:49 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id AB07713C459 for ; Thu, 17 Jan 2008 03:40:48 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id m0H3ek8L052388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Jan 2008 14:10:46 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-stable@freebsd.org Date: Thu, 17 Jan 2008 14:10:25 +1030 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1694949.LQK0J3eQ1o"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200801171410.38488.doconnor@gsoft.com.au> X-Spam-Score: -3.405 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Subject: kldstat causes kernel to print odd message X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2008 03:40:49 -0000 --nextPart1694949.LQK0J3eQ1o Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, I have built my own release of 6.3 (slightly older than 6.3 as tagged)=20 and I am seeing an odd cosmetic problem. Whenever I kldload a module=20 (stuff loaded by the loader doesn't do it) I get this in dmesg.. kldload: Unsupported file type The actual module works fine though (shows up in kldstat etc) I traced the call path kldstat -> linker_load_module -> linker_load_file And it seems that the TAILQ_FOREACH() in linker_load_file is iterating=20 over 2 things - 'elf64' and 'elf64_obj'. LINKER_LOAD_FILE is defined by linker_if.m/h and looks like.. static __inline int LINKER_LOAD_FILE(linker_class_t cls, const char*=20 filename, linker_file_t* result) { kobjop_t _m; KOBJOPLOOKUP(cls->ops,linker_load_file); return ((linker_load_file_t *) _m)(cls, filename, result); } Now it seems that link_elf.c and link_elf_obj.c both define identical=20 methods & function names with very similar code. The one in link_elf_obj.c works and the one in link_elf.c doesn't.. I am=20 not sure why they both exist though. The one in link_elf.c fails at.. if (hdr->e_type !=3D ET_EXEC && hdr->e_type !=3D ET_DYN) { link_elf_error("Unsupported file type"); error =3D ENOEXEC; goto out; } I note that the _obj version checks if e_type is ET_REL (and lo it is). Can anyone explain what the underlying problem is? (I am guessing some=20 ordering issue where normally elf64_obj is called first so the other is=20 normally never called..) Thanks. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1694949.LQK0J3eQ1o Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHjs425ZPcIHs/zowRAuHtAJ9uObo8vgtn16iNpZ8pYk6ZOYRq9wCeMW3k Oj0aYIMs+eUmde4wFjWL154= =zLmf -----END PGP SIGNATURE----- --nextPart1694949.LQK0J3eQ1o--