From owner-freebsd-arm@FreeBSD.ORG Fri Aug 8 14:52:16 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BBE0375 for ; Fri, 8 Aug 2014 14:52:16 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D452F2D2B for ; Fri, 8 Aug 2014 14:52:15 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XFlWf-0005fQ-UN; Fri, 08 Aug 2014 14:52:14 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s78EqCDQ021571; Fri, 8 Aug 2014 08:52:12 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+y9CnmC2GVBkYrcKKhvAuc X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: Loading modules with KB920X panics From: Ian Lepore To: Hans Petter Selasky In-Reply-To: <53E46361.4020605@selasky.org> References: <53E1E122.9040304@selasky.org> <1407462608.56408.350.camel@revolution.hippie.lan> <53E46361.4020605@selasky.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 08 Aug 2014 08:52:11 -0600 Message-ID: <1407509531.56408.358.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2014 14:52:16 -0000 On Fri, 2014-08-08 at 07:42 +0200, Hans Petter Selasky wrote: > On 08/08/14 03:50, Ian Lepore wrote: > > On Wed, 2014-08-06 at 10:02 +0200, Hans Petter Selasky wrote: > >> Hi, > >> > >> I'm building a custom module for KB920X and it panics when loading > >> because structures like Elf32_Rel and Elf32_Rela are not aligned. > >> > >> I added __packed keyword and the errors seems to be going away. > >> > >> Any clues what is wrong? > >> > >> .ko file can be supplied. > >> > >> FreeBSD-current > >> > > > > We load .ko modules on our at91rm92 stuff at work (although I haven't > > tested anything newer than 10.0 mid-last year). > > > > It seems odd that the reloc info would be unaligned. The ldscript > > should align the start of the section, and it should stay aligned after > > that. > > > > Hi, > > This was an out-of-the kernel module, built under the build environment > for ARM. Can you point me to the linker script responsible for this? > > I specified: --warn-section-align > > And it output some warnings. Any clues how I can nail this down? > > If someone is interested I can give you the source code and build > instructions. > > --HPS Sure, send the stuff to me and I'll see if I can figure anything out. I've just discovered there isn't a separate ldscript for building modules, it just uses the generic arm script compiled into ld. -- Ian