Operating System - Linux
1828219 Members
1949 Online
109975 Solutions
New Discussion

Subject: Problem loading DLKM module: MOD: mod_obj_relone: Illegal relocation type R_IA_64_GPREL22

 
hp-ux technical documen
Occasional Contributor

Subject: Problem loading DLKM module: MOD: mod_obj_relone: Illegal relocation type R_IA_64_GPREL22

Hi
I am trying to compile and load one very basic module in hpux 11i v2 on IA machine. But when I give kcmodule mymod=best I get following error -
WARNING: MOD: mod_obj_relone: Illegal relocation type R_IA_64_GPREL22 42 (0x2a) in module /stand/current/mod/tmod. It may be due to incorrect compiler/linker options when building the module.

I have the bundled cc installed on my machine (dont have ANSI/C compiler, as that needs to be purchased). As suggested earlier in the same thread, +Oshortdata=0 option is not supported in bundled compiler. Then how can I load a module with supplied compiler. Interesting is that I could do this in another same type IA machine, whose disk has gone bad due to some reason, and I rewrote the module... wondering what I am doing wrong.

Thanks.
2 REPLIES 2
Kent Ostby
Honored Contributor

Re: Subject: Problem loading DLKM module: MOD: mod_obj_relone: Illegal relocation type R_IA_64_GPREL22

Looking at : http://docs.hp.com/en/dlkm-62001/ch01s03.html

It suggests:

For a 64-bit Itanium target machine, execute the following cc(1) command:


/opt/ansic/bin/cc -I. -I/usr/conf -I/usr/conf/sys \ -Wp,-H300000 +kernel +Oshortdata=0 +XixdU +O2 +ESlit +DD64 \-Ae -DLWSYSCALL -DPGPROF -DACLS -DAUDIT -DIDDS -D__ROSE__ \-DHPONCPLUS -DVARIABLE_UAREA -DSTCP -DIVT_INTERCEPT \-D_UNSUPPORTED -D_HPUX_SOURCE -D_XPG4_EXTENDED -D_KERNEL \ -D__STDC_EXT__ -D_CLEAN_BE -D_SYSCALL_64 -­_NO_PA_HDRS \-DKERNEL_DEBUGGER -U__IA64__ -U__hp9000s800 \-U__hp9000s700 -U__hppa -o mod.o -c module_name.c

I realize you are not using ANSI/C, but can you try the options listed above and see if that fixes it?

Oz
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Dennis Handly
Acclaimed Contributor

Re: Subject: Problem loading DLKM module: MOD: mod_obj_relone: Illegal relocation type R_IA_64_GPREL22

You can NOT create DLKMs unless you use the HP's ANSI C or aC++ compilers. The bundled compiler is not supported for program development.