From owner-freebsd-arm@FreeBSD.ORG Fri Aug 8 05:42:34 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FBD3DD; Fri, 8 Aug 2014 05:42:34 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F8A12D45; Fri, 8 Aug 2014 05:42:34 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 2E9571FE027; Fri, 8 Aug 2014 07:42:32 +0200 (CEST) Message-ID: <53E46361.4020605@selasky.org> Date: Fri, 08 Aug 2014 07:42:57 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: Loading modules with KB920X panics References: <53E1E122.9040304@selasky.org> <1407462608.56408.350.camel@revolution.hippie.lan> In-Reply-To: <1407462608.56408.350.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 05:42:34 -0000 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