I am working on Cortex-A9 and M3 of ARM. I am using gcc 4.4.0, uClibc
0.9.30.1 and binutils 2.19.1 and building it for Cortex-m3. While building for m3 if I specify arch as armv7-m alonmg with cpu cortex-m3, the build fails. Using the same set, if I build the toolchain for Cortex-A9 (cpu=cortex-a9 and arch=armv7-a), the Linux kernel (2.6.28.9) and rootfs built with this toolchain works fine. But if I build a loadable kernel module, when I insmod the module it fails and gives an error as "undefined relocation: 43" from the Linux kernel. Is there any change in way LKM should be built with gcc 4.4.0? Any suggestion will be appreciated. Regards, |
> -----Original Message----- > From: [hidden email] [mailto:binutils- > [hidden email]] On Behalf Of Nitin Garg > Sent: 01 May 2009 14:09 > To: [hidden email] > Subject: Re: Problem with binutils with Cortex-m3 and cortex-a9 cpu > > I am working on Cortex-A9 and M3 of ARM. I am using gcc 4.4.0, uClibc > 0.9.30.1 and binutils 2.19.1 and building it for Cortex-m3. While > building for m3 if I specify arch as armv7-m alonmg with cpu > cortex-m3, the build fails. Can you be more specific and mention what your parameters are and what the error message is ? > > Using the same set, if I build the toolchain for Cortex-A9 > (cpu=cortex-a9 and arch=armv7-a), the Linux kernel (2.6.28.9) and > rootfs built with this toolchain works fine. But if I build a loadable > kernel module, when I insmod the module it fails and gives an error as > "undefined relocation: 43" from the Linux kernel. Probably that's because modutils needs to handle relocation 43 which looking at the include file is R_ARM_MOVW_ABS_NC. cheers Ramana |
In reply to this post by Nitin Garg-2
About Cortex-m3 build log, I will send you in some time today.
Is there a solution for Cortex-A9 Loadable kernel module problem? Do I need to change the way LKMs are built? Regards, On Fri, May 1, 2009 at 8:13 AM, Ramana Radhakrishnan <[hidden email]> wrote: > > >> -----Original Message----- >> From: [hidden email] [mailto:binutils- >> [hidden email]] On Behalf Of Nitin Garg >> Sent: 01 May 2009 14:09 >> To: [hidden email] >> Subject: Re: Problem with binutils with Cortex-m3 and cortex-a9 cpu >> >> I am working on Cortex-A9 and M3 of ARM. I am using gcc 4.4.0, uClibc >> 0.9.30.1 and binutils 2.19.1 and building it for Cortex-m3. While >> building for m3 if I specify arch as armv7-m alonmg with cpu >> cortex-m3, the build fails. > > Can you be more specific and mention what your parameters are and what the > error message is ? > >> >> Using the same set, if I build the toolchain for Cortex-A9 >> (cpu=cortex-a9 and arch=armv7-a), the Linux kernel (2.6.28.9) and >> rootfs built with this toolchain works fine. But if I build a loadable >> kernel module, when I insmod the module it fails and gives an error as >> "undefined relocation: 43" from the Linux kernel. > > Probably that's because modutils needs to handle relocation 43 which looking > at the include file > is R_ARM_MOVW_ABS_NC. > > > cheers > Ramana > > > |
> -----Original Message----- > From: Nitin Garg [mailto:[hidden email]] > Sent: 01 May 2009 14:21 > To: Ramana Radhakrishnan > Cc: [hidden email] > Subject: Re: Problem with binutils with Cortex-m3 and cortex-a9 cpu > > About Cortex-m3 build log, I will send you in some time today. > > Is there a solution for Cortex-A9 Loadable kernel module problem? Do I > need to change the way LKMs are built? You could downgrade your architecture options to something that doesn't generate Movw's or movt or support these relocations in your modutils which will work around the problem for you (-march=armv6). That's the only work around I can suggest at the moment. Please take up the issue of supporting the relocs with the kernel folk or whoever maintains the code for modutils . HTH. Ramana > > Regards, > > On Fri, May 1, 2009 at 8:13 AM, Ramana Radhakrishnan > <[hidden email]> wrote: > > > > > >> -----Original Message----- > >> From: [hidden email] [mailto:binutils- > >> [hidden email]] On Behalf Of Nitin Garg > >> Sent: 01 May 2009 14:09 > >> To: [hidden email] > >> Subject: Re: Problem with binutils with Cortex-m3 and cortex-a9 cpu > >> > >> I am working on Cortex-A9 and M3 of ARM. I am using gcc 4.4.0, > uClibc > >> 0.9.30.1 and binutils 2.19.1 and building it for Cortex-m3. While > >> building for m3 if I specify arch as armv7-m alonmg with cpu > >> cortex-m3, the build fails. > > > > Can you be more specific and mention what your parameters are and > what the > > error message is ? > > > >> > >> Using the same set, if I build the toolchain for Cortex-A9 > >> (cpu=cortex-a9 and arch=armv7-a), the Linux kernel (2.6.28.9) and > >> rootfs built with this toolchain works fine. But if I build a > loadable > >> kernel module, when I insmod the module it fails and gives an error > as > >> "undefined relocation: 43" from the Linux kernel. > > > > Probably that's because modutils needs to handle relocation 43 which > looking > > at the include file > > is R_ARM_MOVW_ABS_NC. > > > > > > cheers > > Ramana > > > > > > |
In reply to this post by Nitin Garg-2
> Is there a solution for Cortex-A9 Loadable kernel module problem? Do I
> need to change the way LKMs are built? Fix the kernel, or compile with -mword-relocations. Paul |
In reply to this post by Nitin Garg-2
On Fri, 1 May 2009, Nitin Garg wrote:
> Using the same set, if I build the toolchain for Cortex-A9 > (cpu=cortex-a9 and arch=armv7-a), the Linux kernel (2.6.28.9) and > rootfs built with this toolchain works fine. But if I build a loadable > kernel module, when I insmod the module it fails and gives an error as > "undefined relocation: 43" from the Linux kernel. Wind River's patch for this has now been sent upstream. http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=5507/1 http://lists.arm.linux.org.uk/lurker/thread/20090507.152208.99d5d0e5.en.html -- Joseph S. Myers [hidden email] |
Free forum by Nabble | Edit this page |