I am hoping that someone can help me with a problem I'm
having on solaris 2.7. I have an NCR MP-RAS unix driver that was
converted to Solaris 2.7. This Driver has an LU side and a PU
side (see diagram below) with each having their own streams
definitions and the required solaris module config entry points,
modlinkage, and auto config entry points. When I load the PU driver,
/* I use the following command to load the drivers:
/usr/sbin/add_drv -m '* 0666 root sys' pu
/usr/sbin/add_drv -m '* 0666 root sys' lu
*/
Solaris loads it successfully and devices get created. When I try
to load the LU driver I get the following error:
drvconfig: Driver (lu) failed to attach
Warning: Driver (lu) successfully added to system but failed to attach
On the /var/adm/messages log, the following error is logged:
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix: LU_srv
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix: LU_uwput
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix: LU_close
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix: LU_open
Sep 30 16:36:11 phoebus unix: /usr/kernel/drv/lu: undefined symbol
Sep 30 16:36:11 phoebus unix: LU_ursrv
Sep 30 16:36:11 phoebus unix: WARNING: mod_load:
Sep 30 16:36:11 phoebus unix: cannot load module 'lu'
The functions listed above as undefined symbols are defined in
lu.Driver.c as
follows:
extern int LU_open(queue_t *, dev_t *, int, int, cred_t *);
extern int LU_close(queue_t *, int, cred_t *);
extern int LU_uwput(queue_t *, mblk_t *);
extern int LU_srv(queue_t *);
extern int LU_ursrv(queue_t *);
and actually exist in the pu.Driver.c
I compile with the following job:
/usr/xpg4/bin/make -f r3mux.mk
/opt/SUNWspro/SC4.2/bin/cc -c -DMP -D_KERNEL -DKERNEL lu.Driver.c
/opt/SUNWspro/SC4.2/bin/cc -c -DMP -D_KERNEL -DKERNEL pu.Driver.c
partial display of nm -s output is :
lu.Driver.o:
[Index] Value Size Type Bind Other Shname Name
[66] | 0| 0|NOTY |GLOB |0 |UNDEF |LU_close
[67] | 0| 0|NOTY |GLOB |0 |UNDEF |LU_open
[63] | 0| 0|NOTY |GLOB |0 |UNDEF |LU_srv
[68] | 0| 0|NOTY |GLOB |0 |UNDEF |LU_ursrv
[64] | 0| 0|NOTY |GLOB |0 |UNDEF |LU_uwput
pu.Driver.o:
[Index] Value Size Type Bind Other Shname
Name
[91] | 4224| 957|FUNC |GLOB |0 |.text
|LU_close
[95] | 2528| 813|FUNC |GLOB |0 |.text
|LU_open
[77] | 15952| 681|FUNC |GLOB |0 |.text
|LU_srv
[76] | 17040| 820|FUNC |GLOB |0 |.text
|LU_ursrv
[81] | 11328| 3709|FUNC |GLOB |0 |.text
|LU_uwput
My question is how do I get the extern symbols defined when I load the
lu driver?
How does solaris resolve the symbol table?
I would think that once the pu driver was successfully loaded,
its symbols and function would be resolved for the lu driver.
(linked together like with MP_RAS UNIX).
ANY IDEAS?
DATA flow between the APPLICATIONS, through the mux, and to the
snabase
LU application
snabase
read write getmsg
putmsg
| | | |
user
----|--------|-----------------------------|-------|-----------
---- ---- ---- ---- kernel
space
stream | rq | | wq | stream | rq | | wq
|
heads ---- ---- heads ----
----
| | |
|
^ v ^
v
| | |
|
---- ---- ----
----
| rq | | wq | LU side | rq | | wq | PU
side
---- ---- queues ---- ----
queues
| | ^
|
^ v |
v
| -------- -----> -------
|
^
v
|
|
----- <------------ ------ <---------
---