Operating System - HP-UX
1833730 Members
2352 Online
110063 Solutions
New Discussion

Illegal relation type 72, for hpux 11i V1

 
learner_1
Occasional Contributor

Illegal relation type 72, for hpux 11i V1

Hi,
I have written a dlkm module for HPUX 11iV1. When I am trying to load the module through kmadmin -L command I am getting following error message -
Illegal relocation type 72 in module /stand/dlkm/mod.d/mymodule
Relocation in module /stand/dlkm/mod.d/mymodule failed.

Can somebody tell me what went wrong.

Thanks.
3 REPLIES 3
Peter Godron
Honored Contributor

Re: Illegal relation type 72, for hpux 11i V1

Hi,
sounds like a coding problem to me. However,
have you had a look at:
http://docs.hp.com/en/dlkm-62001/
Especially the compiler/linker options in the "Sample DLKM WSIO Class Driver" section.

http://forums1.itrc.hp.com/service/forums/helptips.do?#28
learner_1
Occasional Contributor

Re: Illegal relation type 72, for hpux 11i V1

First of all sorry for the typo.... it was "Illegal relocation type 72" instead of "Illegal relation type", well I tried figuring out what is wrong... so to give the complete scenerio.. I am linking many other .o files with the main module file, and creating a final mod.o to load. I am using the command "ld -r" to link these files. So While doing this exercise, couple of times I got "Illegal relocation type 72", and many other times I got " WARNING: MOD: mod_obj_relone: Illegal relocation type 58 in module /stand/dlkm/mod.d/basemod." And "NOTICE: MOD: mod_obj_load: Relocation in module /stand/dlkm/mod.d/basemod failed"...
I couldnt figure out till now the reason for the failure... some files link properly, and the module loads, but a couple files give this error... These files look good otherwise as I tested them independently..

Thanks.
learner_1
Occasional Contributor

Re: Illegal relation type 72, for hpux 11i V1

got the solution. I needed to compile the module and the related files with following options... (I was missing +ES1.Xindirect_calls) -

/opt/ansic/bin/cc -I. -I/usr/conf -I/usr/conf/sys \
-Wp, -H300000 +Hx0 +R500 +ESsfc +ESssf +XixdU \
+ES1.Xindirect_calls +ESlit +02 +Oentrysched +Ofastaccess \
+DA2.0W +DS2.0 -Ae -DLWSYSCALL -DPGPROF -DACLS -DAUDIT \
-DIDDS -D__ROSE__ -DHPONCPLUS -D__ROSEVILLE__ \
-DSPP_OBP_BOOT -DSPP_RUNWAY_ERR_ENABLED -DPARISC \
-DRDB -DNEW_RDB -DKGDB_ON -DIVT_INTERCEPT -DCOMB_FLIPPER \
-DNEW_MFCTL_W -DSTCP -DIPSEC -D_UNSUPPORTED \
-D_HPUX_SOURCE -D_XPG4_EXTENDED -D_KERNEL -D__STDC_EXT__ \
-D_CLEAN_BE -D__TEMP64__ -D__hp9000s800 -D__NO_EM_HDRS \
-U__hp9000s700 -o mod.0 -c module_name.c