[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
inter-library linking
From: |
Joachim Worringen |
Subject: |
inter-library linking |
Date: |
Fri, 12 Oct 2007 14:39:16 +0200 |
User-agent: |
Thunderbird 2.0.0.6 (Windows/20070728) |
Greetings,
I have a problem with the following task, using libtool in
automake-Makefiles:
"libshared" needs to be a shared library, as it will be used with
LD_RELOAD. It builds from its own sources, but also depends on two other
libraries that are built within the same source three: "libnoinst" and
"libfoo". libnoinst is a static convenience library, while libfoo is
just another shared library.
While the symbols from libnoinst are placed into libshared, the
references to libfoo remain unresolved. This lets the linking fail when
I set LD_PRELOAD=libshared.so: symbols from libfoo.so can not be
resolved (although it is in the LD path, same as where libshared is placed).
Explicitely linking libshared.so to libfoo.a fails as its object files
are not compiled as PIC (and I don't know how tell automake to do this
anyway...).
What is the recommended solution? I figure one solution would be to
compile the sources of libfoo again, this time into libshared.so. But
this seems very clumsy to me. Is there a way to
- let libtool generate PIC object files for static libs
- then tell automake to link to the static version of a library?
thanks, Joachim
--
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
- inter-library linking,
Joachim Worringen <=