Jayaraman, Bhaskar wrote:
I've been using this linker line so far,
ld -dy -N driver2 -r driver2.o -o driver2
Upon your suggestion I modified this to
ld -dy -N driver2 -N misc/scsi -r driver2.o -o driver2
That looks bogus.
I think you want
ld -dy -N drv/somedriver -N misc/scsi -r driver2.o driver2
(Note that drv/somedriver would need to be installed in
/kernel/drv/amd64/ -- assuming you had an amd64 machine. On SPARC it
would be /kernel/drv/sparcv9/ and on 32-bit x86 just /kernel/drv/)
The misc/scsi module is found in /kernel/misc/{sparcv9,amd64,}/scsi
It should be present. Of course, if you're not using misc/scsi (i.e.
the SCSA framework), then you can drop the reference to above it!
- Garrett
In spite of this I'm getting errors after loading the driver. It isn't able to
attach because the scsi symbols aren't being resolved.
Any other tricks? Is misc/scsi supposed to be in the /kernel/drv directory or
something? Because I don't have it there.
Regards,
Bhaskar.
-----Original Message-----
From: cas...@holland.sun.com [mailto:cas...@holland.sun.com] On Behalf Of
casper....@sun.com
Sent: Friday, August 28, 2009 5:12 PM
To: Jayaraman, Bhaskar
Cc: opensolaris-code@opensolaris.org
Subject: Re: [osol-code] Exporting solaris symbols from driver!
Hi I have two loadable modules and one of them depends on the other for some
symbols. I'm using
ld -N driver1 -o driver2 driver2.o
to resolve the symbol, but when I do so I'm unable to attach driver2 because it
is unable to resol
ve symbols for scsi_hba_tran_alloc etc. and related API's exported by the
transport layer.
Is there a way to export symbols from one module globally in solaris?
You'll need to link with the other device driver:
ld -dy -Nmisc/scsi
-dy - force dynamic linking
-Nmisc/scsi - add "misc/scsi" as a dependency
Casper
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code