This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld, shared objects and makefiles
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: John Fisher <john dot fisher at nec dot com dot au>
- Cc: binutils at sourceware dot org
- Date: Wed, 5 Aug 2009 21:54:39 +0930
- Subject: Re: ld, shared objects and makefiles
- References: <4A794A6B.7080608@nec.com.au>
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