[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ELF extension for starting symbol search from module dependencies

On Thu, 2002-08-22 at 08:13, Roland McGrath wrote:
> I think you can get the effect you need just by using -Bsymbolic.  In your
> example, build the GTK+ library with -Bsymbolic.  If that causes problems
> because some of the library's references should be resolved in the normal
> global scope, then confine the code that uses libpng to a wrapper library
> that you build with -Bsymbolic.  Then link the GTK+ library against that
> shared object, and I think you will get the result you need: the GTK+
> library code that uses libpng will be in a DT_SYMBOLIC object and thus
> resolve according to its own dependency on the desired libpng soname,
> while the application is free to link a conflicting libpng in directly.
But -Bsymbolic only puts the module that uses it in front of the search
list so the wrapper will use the library used by the program and will

You could do this by dlopen'ing libpng and getting symbols from it with
dlsym but this requires source modifications and isn't exactly elegant
(and lazy lookups require even more modifications).

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: