Re: DLKM load module meet a strange problem. (243 Views)
Reply
Advisor
younglovezhenzhen
Posts: 20
Registered: ‎02-05-2009
Message 1 of 9 (243 Views)

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
Advisor
younglovezhenzhen
Posts: 20
Registered: ‎02-05-2009
Message 2 of 9 (243 Views)

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?
Advisor
younglovezhenzhen
Posts: 20
Registered: ‎02-05-2009
Message 3 of 9 (243 Views)

Re: DLKM load module meet a strange problem.

My system environment is:
HP-UX 11i Version 2 Foundation Operating Environment june 2008.
Acclaimed Contributor
Dennis Handly
Posts: 25,188
Registered: ‎03-06-2006
Message 4 of 9 (243 Views)

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.
Advisor
younglovezhenzhen
Posts: 20
Registered: ‎02-05-2009
Message 5 of 9 (243 Views)

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
Dennis Handly
Posts: 25,188
Registered: ‎03-06-2006
Message 6 of 9 (243 Views)

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?)?
Advisor
younglovezhenzhen
Posts: 20
Registered: ‎02-05-2009
Message 7 of 9 (243 Views)

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
Advisor
younglovezhenzhen
Posts: 20
Registered: ‎02-05-2009
Message 8 of 9 (243 Views)

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.
Advisor
younglovezhenzhen
Posts: 20
Registered: ‎02-05-2009
Message 9 of 9 (243 Views)

Re: DLKM load module meet a strange problem.

close...
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.