[PATCH 0/5] elfutils: don't use dlopen() for libebl modules

Omar Sandoval osandov@osandov.com
Sat Jul 6 00:35:00 GMT 2019


From: Omar Sandoval <osandov@fb.com>

Hello,

This series is a followup to my RFC [1]. Compared to the RFC patches,
this series adds patch 1 as a trivial cleanup, patch 3 to fix an
oversight in the RFC w.r.t. PIC object files sneaking into libdw.a, and
patch 5 to implement my suggestion for reducing the size of the elfutils
binaries by exporting libebl symbols from libdw.so. After this series,
libebl no longer uses dlopen() to find backends, and the total size of
the package is actually smaller than before (2.1 MB):

44K     ./libasm/libasm.so
672K    ./libdw/libdw.so
120K    ./libelf/libelf.so
52K     ./src/nm
28K     ./src/size
60K     ./src/strip
116K    ./src/elflint
28K     ./src/findtextrel
36K     ./src/addr2line
32K     ./src/elfcmp
40K     ./src/objdump
32K     ./src/strings
48K     ./src/ar
60K     ./src/unstrip
36K     ./src/stack
40K     ./src/elfcompress
32K     ./src/ranlib
236K    ./src/readelf
1.7M    total

If there are no issues, I'd love to see this merged, as it greatly
simplifies using libdw in environments where dlopen() is not supported.

Thanks!

1: https://sourceware.org/ml/elfutils-devel/2019-q3/msg00010.html

Omar Sandoval (5):
  libebl: remove unnecessary variable in Makefile.am
  libcpu: merge libcpu_{i386,x86_64,bpf} into one library
  Add PIC and non-PIC variants of libcpu and libebl
  Don't use dlopen() for libebl modules
  libdw: export libebl symbols

 ChangeLog                |   6 +
 Makefile.am              |   4 +-
 backends/ChangeLog       |   6 +
 backends/Makefile.am     | 104 +++------------
 configure.ac             |  12 +-
 libcpu/ChangeLog         |   6 +
 libcpu/Makefile.am       |  24 ++--
 libdw/ChangeLog          |   9 ++
 libdw/Makefile.am        |  21 ++-
 libdw/libdw.map          |  60 ++++++++-
 libebl/ChangeLog         |  12 ++
 libebl/Makefile.am       |  46 ++++---
 libebl/eblclosebackend.c |   4 -
 libebl/eblopenbackend.c  | 267 +++++++++++++++------------------------
 libebl/libebl.h          |   8 +-
 libebl/libeblP.h         |   3 -
 src/ChangeLog            |  17 +++
 src/Makefile.am          |  21 ++-
 tests/ChangeLog          |   5 +
 tests/Makefile.am        |  36 +++---
 tests/test-subr.sh       |   4 +-
 21 files changed, 331 insertions(+), 344 deletions(-)

-- 
2.22.0



More information about the Elfutils-devel mailing list