Operating System - HP-UX
1833889 Members
1685 Online
110063 Solutions
New Discussion

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

 
Omkar
Occasional Contributor

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

Hi

I am trying to load my module on HP-UX 11i v1.5 (11.20) on an i2000 workstation. When I try to load my DLKM module, I get the following error:

vmunix: WARNING: MOD: mod_obj_relone: Illegal relocation type R_IA_64_GPREL22 42 (0x2a) in module /stand/dlkm.3CFE44A61194/mod.d/my_module/0.1.0/my_module.
vmunix:
vmunix: NOTICE: MOD: mod_obj_load: Relocation in module /stand/dlkm.3CFE44A61194/mod.d/my_module/0.1.0/my_module failed.

AS this is something ia64 specific, please let me know whats going wrong.

The same module on PA-RISC running 11.11 (11i v1.0) is working fine.

Thanks
-Omkar
somkar@in.ibm.com
I am new here
1 REPLY 1
Martin Reinders
New Member

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

I had the same problem, and adding the
compiler option +Oshortdata=0 solved
it for me.

/stand/build/config.mk contains
CC_OPTIONS_KM=+Oshortdata=0,
but CC_OPTIONS_KM are not added
to the CC_OPTS, so this is not used.

If you /stand/build/config.mk as template
for your makefile, you could replace

CC_OPTS=${CC_OPTIONS} ${DAFLAG} ${DSFLAG} ${DDFLAG}

by
CC_OPTS=${CC_OPTIONS} ${CC_OPTIONS_KM) ${DAFLAG} ${DSFLAG} ${DDFLAG}