From owner-freebsd-amd64@FreeBSD.ORG Fri Aug 10 19:49:24 2007 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE38616A469 for ; Fri, 10 Aug 2007 19:49:24 +0000 (UTC) (envelope-from yrao@force10networks.com) Received: from mx.force10networks.com (corp.force10networks.com [64.186.164.204]) by mx1.freebsd.org (Postfix) with ESMTP id 8D1D613C4DD for ; Fri, 10 Aug 2007 19:49:24 +0000 (UTC) (envelope-from yrao@force10networks.com) Received: from mx.force10networks.com ([10.11.0.216]) by mx.force10networks.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 10 Aug 2007 12:37:58 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 10 Aug 2007 12:37:56 -0700 Message-ID: <9E2742C54E161041A53F36F9A8DC31BE32494A@EXCH-CLUSTER-04.force10networks.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: kldload issue: "Exec format error" with amd64 FreeBSD Thread-Index: AcfbhfOxrX60r9K7R2W77IUt4vy1AQ== From: "Yong Rao" To: X-OriginalArrivalTime: 10 Aug 2007 19:37:58.0967 (UTC) FILETIME=[F4ED3C70:01C7DB85] Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: kldload issue: "Exec format error" with amd64 FreeBSD X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2007 19:49:24 -0000 Hi, =20 I am porting a device driver from 32 bit FreeBSD OS (6.2) to amd64 (6.2-RELEASE-p7). The compiling passed without any problem. But while I do kldload the module, we got problem. =20 kldload: can't load ./pnicdrv.ko: Exec format error =20 the dmesg displayed =20 kldload: Unsupported file type kldload: unexpected relocation type 7 link_elf: symbol strcpy undefined =20 What the problem is? =20 In the compiling option we added extra "-m64 -fPIC ...". What particular options/flags else we should add in? Is there example makefile(device driver code set) we can refer to? =20 Thanks a lot, =20 Yong Rao Force10 networks Inc San Jose, CA =20 408 571 3617 =20 =20