From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7f3d9a4f569b029c,start X-Google-Attributes: gidfee84,public X-Google-Thread: 1164f8,7f3d9a4f569b029c,start X-Google-Attributes: gid1164f8,public From: vivek@medea.cs.rice.edu (Vivek Sadananda Pai) Subject: Loading modules (ldr_xload) in OSF/1 Date: 1996/01/29 Message-ID: <4ejkkk$rtc@larry.rice.edu>#1/1 X-Deja-AN: 137072907 organization: Rice University, Houston, Texas newsgroups: comp.unix.osf.osf1,comp.sys.dec originator: vivek@medea.cs.rice.edu I am trying to find out information about loading modules, specifically about loading and unloading modules into and out of the kernel. I've tried man pages, dxbook, and searching the net, but I haven't found anything that wasn't in the man pages, which are pretty skimpy on this topic. I did a man on ldr_xload, and can see that it allows you to insert an object file into either a process or the kernel. That makes sense, and I understand it. I then did a man on ldr_xentry, and can see that it gives back an entry point of the form typedef int (*ldr_entry_pt_t)(); /* an entry point */ when it gets called. So, it seems that each module has exactly one entry point, but I didn't see any way to specify that entry point. Perhaps the entry point has the same name as the filename, since the filename is one of the few parameters to ldr_xload. It's also not clear to me what this entry point is - I assume that if you've installed something into the kernel, then some form of wrapper code had to be produced somewhere to do the trap. I guess in this case, the entry point might be a user-space stub which does this. I'm also not sure how to pass arguments to the entry point, or what form the arguments can be. So, my main questions: a) what is this entry point? b) how is the entry point specified? c) what arguments can the entry point take? d) if the entry point is into the kernel, does the OS write the necessary code in user-space to do the trap? I am minorly familiar with the modload() function from SunOS and NetBSD, so even a comparison between the two would be appreciated. I would appreciate any help that anyone can provide, since I can't seem to find any other documentation on this topic. Thanks, Vivek