Loading modules with KB920X panics

Ian Lepore ian at FreeBSD.org
Fri Aug 8 14:52:16 UTC 2014


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




More information about the freebsd-arm mailing list