https://sourceware.org/bugzilla/show_bug.cgi?id=32293

--- Comment #2 from rudi at heitbaum dot com ---
(In reply to Mark Wielaard from comment #1)
> Is there a reason vl4-utils cannot simply be linked shared to libelf?
> In general we aren't really testing static linking.
> Which indeed means it is now broken :{
> 
> Maybe something like the following would help?
> 
> diff --git a/libelf/Makefile.am b/libelf/Makefile.am
> index 3402863ef174..2d3dbdf22756 100644
> --- a/libelf/Makefile.am
> +++ b/libelf/Makefile.am
> @@ -122,6 +122,9 @@ libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS)
> $(libelf_so_DEPS)
>         @$(textrel_check)
>         $(AM_V_at)ln -fs $@ $@.$(VERSION)
>  
> +libeu_objects = $(shell $(AR) t ../lib/libeu.a)
> +libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects))
> +
>  install: install-am libelf.so
>         $(mkinstalldirs) $(DESTDIR)$(libdir)
>         $(INSTALL_PROGRAM) libelf.so
> $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
> 
> I don't have anything to test that with though.
> (You'll need to autoregen -f -v -i)

That indeed does fix the issue. 

We generally statically link when shared libraries are not widely used to
reduce disk space in the embedded image. In this case where libelf is linked a
few times against binaries - in the case of keytable to static footprint is
40K, and libelf itself is only 101K is is probably worth reviewing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to