lkml.org 
[lkml]   [2010]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: loadable kernel module link failure - endianness incompatible with that of the selected emulation
    Date


    On Tue, 19 Jan 2010 15:47 -0800, "David Daney"
    <ddaney@caviumnetworks.com> wrote:
    > myuboot@fastmail.fm wrote:
    > > I got a link error when compiling 2 loadable kernel modules -
    > > "endianness incompatible with that of the selected emulation".
    > >
    > > But both kernel and the kernel modules of error are in big endian. I
    > > don't know what I should check or fix. Any suggestions? I checked the
    > > endianess of the kernel by checking the elf header of vmlinux file, is
    > > that the right way to do it?
    > >
    > > Below are the error info and the readelf output, showing both the kernel
    > > and a kernel module are in big endian.
    > > Thanks for your help. Andrew
    > >
    > > 1) error log
    > > make -C /home/root123/sources/kernel/linux
    > > CROSS_COMPILE=""/home/root123/sources/gcc3.4.3-be"/bin/mips-linux-"
    > > M=/home/root123/sources/sdk/platform/src/linux/mxp/src modules
    > >
    > > LD [M] /home/root123/sources/sdk/platform/src/linux/mxp/src/mxpmod.o
    > > /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld:
    > > /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o:
    > > compiled for a big endian system and target is little endian
    > > /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld:
    > > /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o:
    > > endianness incompatible with that of the selected emulation
    > > /home/root123/sources/gcc3.4.3-be/bin/mips-linux-ld: failed to merge
    > > target specific data of file
    > > /home/root123/sources/sdk/platform/src/linux/mxp/src/mmxpcore.o
    > > make[13]: ***
    > > [/home/root123/sources/sdk/platform/src/linux/mxp/src/mxpmod.o] Error 1
    > >
    >
    > Looks like a toolchain bug/configuration-problem. Hard to tell though
    > as you didn't pass 'V=1' on the make invocation line.
    >
    > David Daney
    With the V=1 option suggested, I found the culprit is this "-m
    elf32ltsmip". It is working now.

    Thanks. Andrew


    \
     
     \ /
      Last update: 2010-01-20 17:13    [W:0.028 / U:29.660 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site