Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

DLKM load module meet a strange problem.

DLKM load module meet a strange problem.

Hi all,

Last night I reinstall system, after that I use acc to compile a mod to load. But I meet error in loading, the message is:

bash-4.0# make load
cp vtdisk /usr/conf/mod/vtdisk
if [[ -n "vtdisk.prep" ]] ; then \
cp vtdisk.prep /usr/conf/mod/vtdisk.prep ; \
fi
/usr/sbin/kcmodule -s vtdisk=best
* The automatic 'backup' configuration has been updated.
No preload
ERROR: Unable to load module 'vtdisk': Object file error in loading
kernel module
postload
*** Error exit code 2

Stop.

WARNING: MOD: mod_obj_relone: Overrun of module DLT or long branch stub table for module /stand/current/mod/vtdisk.
NOTICE: MOD: mod_obj_load: Relocation in module /stand/current/mod/vtdisk failed.

WARNING: mod_deletestr: could not find string in the dump string table

MOD: mod_load_helper: error loading vtdisk


It's strange because I have a module that is compiled before the system reinstalled, and this module load well.
Can anyone help me with this problem?

Thanks.

Young
8 REPLIES

Re: DLKM load module meet a strange problem.

I try to load the ddk sample driver that is compiled in this system, but same error.

Is it the system problem?

Re: DLKM load module meet a strange problem.

My system environment is:
HP-UX 11i Version 2 Foundation Operating Environment june 2008.
Acclaimed Contributor Acclaimed Contributor

Re: DLKM load module meet a strange problem.

>WARNING: MOD: mod_obj_relone: Overrun of module DLT or long branch stub table for module /stand/current/mod/vtdisk.
>NOTICE: MOD: mod_obj_load: Relocation in module /stand/current/mod/vtdisk failed.

How big is the text area of vtdisk?
size /stand/current/mod/vtdisk

There may be a limit of 16 Mb.

Re: DLKM load module meet a strange problem.

Hi Dennis,

My module is small, just 24576.
I have reinstall the ddk.depot, ansic and gcc, but still useless.
I don't known what means "overrun of module DLT or long branch stub table".

Thx.
Acclaimed Contributor Acclaimed Contributor

Re: DLKM load module meet a strange problem.

>I don't know what means "overrun of module DLT or long branch stub table".

It means you have too many references to global/static variables or you have too many branches into the kernel.
Or you have used the wrong compile options.

Can you attach your vtdisk module (and vtdisk.prep?)?

Re: DLKM load module meet a strange problem.

Hi,

Here is my prep script:
#!/sbin/sh
############################################################
#This is vtdisk module preparation script
###########################################################

PATH=/sbin:/usr/sbin:/usr/bin
modulename=$1; shift
operation=$1; shift

case $operation in
'preload')
#no op
echo "No preload"
exit 0
;;

'postload')
echo "postload"
status=$1; shift
if [[ $status = 'FAIL' || $status = 'ABORT' ]]; then
#Failed to load, nothing to do
exit 0
fi

if [[ $status != 'LOAD' ]]; then
#unknown command. Exit with no errors/warnings
exit 2
fi
if lsdev | grep vtdisk
then
major_char=`lsdev -h -d vtdisk | awk '{print $1}'`
major_block=`lsdev -h -d vtdisk | awk '{print $2}'`

mknod /dev/rdsk/vtdisk c $major_char 0x000000
mknod /dev/dsk/vtdisk b $major_block 0x000000

else
echo "vtdisk not loaded"
fi

exit 0
;;
'preunload')
echo "preunload"
exit 0
;;
'postunload')
echo "postunload"
status=$1; shift
if [[ $status = 'FAIL' || $status = 'ABORT' ]]; then
#Failed to unload, nothing to do
exit 0
fi

if [[ $status != 'UNLOAD' ]]; then
#unknown command. Exit with no errors/warnings
exit 2
fi
rm /dev/rdsk/vtdisk
rm /dev/dsk/vtdisk

exit 0
;;

esac

#unreachable
exit 1



This is almost the same with the ddk sample driver 's.

Young

Re: DLKM load module meet a strange problem.

Problem is solved.
I have added /usr/local/bin to $PATH, and it was the apple of discord!
After I resume the profile, it goes well again.

But I don't actually know why it casued this problem.
Highlighted

Re: DLKM load module meet a strange problem.

close...