10-19-07 06:32 PM
On Wed, 17 Oct 2007 23:21:12 -0400, Michael B Allen <ioplex@gmail.com> wrote:
> I want to modify a library (libldap) to call a my own getaddrinfo function
> (packaged in libmyresolv). The problem is that libmyresolv links with
> a slew of other libs which creates a number of linking issues (one of
> the libs links with libldap, libldap's build tries to link test programs,
> etc).
This sounds like a circular dependency a lot. You'll have to, somehow,
"break" the circle.
> Ultimately everything is going to be linked together into one big shared
> library anyway so I don't care about undefined references linking just
> libldap.so.
>
> Is there a way to tell the linker to just ignore missing libs lines
> so I can link libldap.so without dragging in all the linking options
> for libmyresolv?
>
> I'm using the standard GNU toolchain and all libs are PIC.
>
> Any advice would be appreciated. [As you can probably tell I'm basical
ly
> trying to provide my own getaddrinfo. If you have any general advice on
> doing that then I would appreciate that too.]
Isn't it easier to build a library which provides *just* getaddrinfo()
[and anything else this one requires to work properly], and then using
LD_PRELOAD to preload it?
env LD_PRELOAD=`pwd`/../lib/libcompat.so ./test1
[ Post a follow-up to this message ]
|