ld, shared objects and makefiles
Alan Modra
amodra@bigpond.net.au
Wed Aug 5 12:24:00 GMT 2009
On Wed, Aug 05, 2009 at 07:01:31PM +1000, John Fisher wrote:
> There's a problem when I do it this way with .so shared objects. The
> name of the directory containing the referenced shared object becomes
> part of the outer shared object. When dlopen is called for the
> referenced shared object, it can't be found. The paths to the referenced
> shared object on the development host and the target are different.
Build your shared objects with a soname. Then the soname will be
used in DT_NEEDED tags rather than the file name. Otherwise you'll
need to create links in the working directory to your shared objects.
Or hack on ld.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list