On demand static/shared libs and binary linkage

Mark Wielaard mark@klomp.org
Thu Jun 7 22:01:00 GMT 2018

On Thu, Jun 07, 2018 at 03:59:22PM +0200, Laurent Stacul wrote:
> Understood.
> In this case, there are 2 solutions:
> - we completely remove the call to dlopen
> - we keep the call to dlopen from the shared lib version of libdw and
> embed all the backends code in the archive
> I don't know if the second solution is worth the additional
> work/complexity. What do you think ?

I kind of did the first on the mjw/RH-DTS branch. Which just has
the backends for the architectures that RHEL officially supports.

But I don't really like it. Ideally I would like to have a configure
option to say which backends need to be linked in directly and keep
the rest dynamic using dlopen. We could then default to include the
native backend (and maybe related sub-archies, like x86_64 plus i386).
But still build and ship the rest as shared libraries that can be
dlopened on demand.

One extra issue is that dlopen code (and libebl in general) has pretty
bad error handling. If we clean up this code it would be nice to get
a better error mechanism for when a backend cannot be found.



More information about the Elfutils-devel mailing list