»
Quick Links
Page 1 of 1
kernel module.c not handling R_ARM_REL32 kernel module.c not handling R_ARM_REL32
#1
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
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
#2
Posted 15 July 2009 - 09:36 AM
venu 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
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 = \
Share this topic:
Page 1 of 1














