Nick Ing-Simmons wrote:
> 
> >The compile and link lines look like this:
> >
> >gcc -c -fPIC -DPRO_MACHINE=19 -DPRO_OS=3 -DSOLARIS -I. -Iincludes
> >    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> >    -I/usr/perl/lib/5.6.1/sun4-solaris/CORE properl.c
> >
> >ld -G -Bsymbolic -o properl.dll properl.o ./protk_dll.a
> >   /usr/perl/lib/5.6.1/sun4-solaris/auto/DynaLoader/DynaLoader.a
> >   -L/usr/perl/lib/5.6.1/sun4-solaris/CORE -lperl
> >   -L/opt/gcc-2.95.3/lib/gcc-lib/sparc-sun-solaris2.6/2.95.3 -lgcc
> >   -lsocket -lnsl -lw -lm -ldl -lc
> >
> >The link step (using ld) is modified by setting '-G -Bsymbolic', then linking
> >in the cad api library (protk_dll.a), 'libgcc' (probably should just use gcc
> >for linking), and 'libw'.
> 
> Can you try without the -Bsymbolic ?
> Or explain why you need it (I don't have a Solaris machine anymore so
> I can't look it up - and Linux man pages are unreliable for Solaris features!
> they are similar but not exactly the same.)

Without -Bsymbolic, the app cannot be loaded at runtime.  It is an 
option used by example makefiles with this CAD api, and it seems 
that I cannot remove it.

>From solaris 'ld' man page:

     -B symbolic
           In dynamic mode only. When building a  shared  object,
           binds  references  to  global symbols to their defini-
           tions, if  available,  within  the  object.  Normally,
           references to global symbols within shared objects are
           not bound  until  runtime,  even  if  definitions  are
           available,  so  that definitions of the same symbol in
           an executable or other shared object can override  the
           object's  own  definition.  ld will issue warnings for
           undefined symbols unless -z defs overrides.

     -G    In dynamic mode only, produces a shared object.  Unde-
           fined symbols are allowed.


I am using gcc built on Solaris 2.6, but linking and running the 
app on Solaris 8.  Could that be causing some issues?


Marc
-- 
Marc Mettes
CAD Support
Bic Corporation

Reply via email to