![]() ![]() |
Jul 27 2007, 01:09 PM
Post
#1
|
|
|
Member ![]() Group: Members Posts: 1 Joined: 27-July 07 Member No.: 76,021 |
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 |
|
|
|
Jul 15 2009, 09:36 AM
Post
#2
|
|
|
Member ![]() Group: Members Posts: 1 Joined: 15-July 09 Member No.: 104,292 |
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 = \ |
|
|
|
![]() ![]() |





Jul 27 2007, 01:09 PM



