Marc Mettes wrote:

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.

You need to lose the -Bsymbolic, it is undoubtedly causing the problem. -Bsymbolic is an obsolete flag intended ony for use when building ld.so.1 itself. I don't know why Dumper.so is trying to look for main(), as it certainly doesn't on my version.


You say that without -Bsymbolic you get errors - what are they exactly? It is likely that you will probably need to add RTLD_GLOBAL to the dlopen flags and/or add some run-time linker dependencies to the various .so files, but without the exact error in the absence of the -Bsymbolic flag it is not possible to suggest a fix.

Useful tools for tracking this sort of problem down on Solaris (should really be in a FAQ somewhere!):

$ ldd isv <file>
show run-time linker dependencies (works on executables and .so's)

$ dump -Lv <file>
Shows dynamic linker section of file (works on executables and .so's)
Look at NEEDED and RUNPATH/RPATH lines.

$ LD_DEBUG=libs <executable>
Show actions of run-time linker as the program runs.
Use 'LD_DEBUG=help /bin/echo' to see the full range of options available. This can be tweaked up to the level where it shows the detailed processing for each symbol resolution - but is *very* verbose!


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

Unlikely.


--
Alan Burlison
--



Reply via email to