previous next top contents index framed top this page unframed
Example D–1 shows examples of dynamically linked CONF and FLI output linked with (static) bootstrap files on the MAINSAIL directory. The example assumes that you have a file of C routines, foo.c, that you wish to call through an FLI MODULE, foofli.s, that has been produced by the MAINSAIL FLI compiler. It assumes that the main routine is located in a file foom.c that calls into MAINSAIL through an FLI MODULE, fcallfoo.s, produced by the entry FLI compiler. It also assumes that you have run CONF to create a bootstrap file myboot.s that specifies FOOFLI as a foreign MODULE and specifies that foreign code starts execution. The environment variable $M is assumed to point to the MAINSAIL directory.
Example D–1. Commands to Put CONF and FLI Output into a Shared Library on SOLRS
| /opt/SUNWspro/bin/cc -K PIC -c foo.c<eol> as -P -o myboot.o myboot.s<eol> as -P -o foofli.o foofli.s<eol> as -P -o fcallfoo.o fcallfoo.s<eol> /opt/SUNWspro/bin/cc -G -o libfooshared.so foo.o myboot.o foofli.o fcallfoo.o<eol> /opt/SUNWspro/bin/cc -o myboot foom.c $M/f.o -lsocket -lnsl -L. -R. -lfooshared<eol> |
MAINSAIL System-Specific User's Guides, Appendix D