Login

Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.

ARM Community: kernel module.c not handling R_ARM_REL32 - ARM Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

kernel module.c not handling R_ARM_REL32 kernel module.c not handling R_ARM_REL32 Rate Topic: -----

#1 User is offline   venu maya 

  • Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 27-July 07

Posted 27 July 2007 - 01:09 PM

Hi ,

I am developing a kernel module for MontaVista Linux 4.0.1 platform using XSCALE LSP for IXP425 based board(IXDP425). My kernel module (xyz.ko) has a relocation section named '.rel.eh_frame' containing four entries with relocation code R_ARM_REL32 (defines as 3). It seems the section 'rel.eh_frame' will be created to handle exception handling.The problem here is with 'module.c' in MVL kernel code (arch/arm/kernel/module.c) is not handling this code (R_ARM_REL32 ) and 'insmod' of module is failing with error 'xyz: unknown relocation: 3". This piece of code is in function 'apply_relocate' of module.c

Any help or pointers regarding this issue will be highly appreciated.

Thanks,
Venu
0

#2 User is offline   av500 

  • Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 15-July 09

Posted 15 July 2009 - 09:36 AM

View Postvenu maya, on Jul 27 2007, 02:09 PM, said:

Hi ,

I am developing a kernel module for MontaVista Linux 4.0.1 platform using XSCALE LSP for IXP425 based board(IXDP425). My kernel module (xyz.ko) has a relocation section named '.rel.eh_frame' containing four entries with relocation code R_ARM_REL32 (defines as 3). It seems the section 'rel.eh_frame' will be created to handle exception handling.The problem here is with 'module.c' in MVL kernel code (arch/arm/kernel/module.c) is not handling this code (R_ARM_REL32 ) and 'insmod' of module is failing with error 'xyz: unknown relocation: 3". This piece of code is in function 'apply_relocate' of module.c


PPC had the same issue with gcc4.4.0, see: http://linux.derkeiler.com/Mailing-Lists/K...2/msg10299.html

The fix is to add this to your linux Makefile:

--- linux/Makefile
+++ linux/Makefile
@@ -563,6 +563,11 @@
# disable invalid "can't wrap" optimzations for signed / pointers
KBUILD_CFLAGS += $(call cc-option,-fwrapv)

+# gcc-4.4 defaults to generating .eh_frame sections, but we aren't
+# interested in those currently. additionally, it causes issues on some
+# architectures.
+KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
+
# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
# But warn user when we do so
warn-assign = \
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic