diff options
author | Omar Sandoval <osandov@fb.com> | 2019-08-26 10:51:46 -0700 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2019-08-29 13:30:30 +0200 |
commit | 4f937e24dc7ad1820fc7c99a6dd6422657f14666 (patch) | |
tree | e7f08c104a0c679eb49b1071fee6e35eda38a993 /src | |
parent | ab415cea199547ee06c50aa82eebe9c58307576f (diff) |
Don't use dlopen() for libebl modules
Currently, architecture-specific code for libebl exists in separate
libebl_$ARCH.so libraries which libebl loads with dlopen() at runtime.
This makes it impossible to have standalone, statically-linked binaries
which use libdwfl if they depend on any architecture-specific
functionality. Additionally, when these libraries cannot be found, the
failure modes are non-obvious. So, let's get rid of libebl_$arch.so and
move it all into libdw.so/libdw.a, which simplifies things considerably.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/Makefile.am | 20 |
2 files changed, 17 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ad673c11..aeb62328 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2019-07-05 Omar Sandoval <osandov@fb.com> + + * Makefile.am: Remove -ldl. + (elflint_LDADD): Add $(libdw). + (elfcmp_LDADD): Add $(libdw). + (objdump_LDADD): Add $(libdw). + 2019-08-26 Mark Wielaard <mark@klomp.org> * readelf (options): Add OPTION_ARG_OPTIONAL "SECTION" for notes. diff --git a/src/Makefile.am b/src/Makefile.am index 69ac4dbe..ab72a0e9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -41,14 +41,14 @@ CLEANFILES += make-debug-archive if BUILD_STATIC libasm = ../libasm/libasm.a -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl +libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) libelf = ../libelf/libelf.a -lz else libasm = ../libasm/libasm.so libdw = ../libdw/libdw.so libelf = ../libelf/libelf.so endif -libebl = ../libebl/libebl.a +libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a libeu = ../lib/libeu.a if DEMANGLE @@ -68,21 +68,21 @@ ranlib_no_Wstack_usage = yes ar_no_Wstack_usage = yes unstrip_no_Wstack_usage = yes -readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl -nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ +readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) +nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \ $(demanglelib) size_LDADD = $(libelf) $(libeu) $(argp_LDADD) -strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl -elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) +elflint_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD) findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib) -elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl -objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl +elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD) +objdump_LDADD = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD) ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) -unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl -stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) +unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) +stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib) elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) elfclassify_LDADD = $(libelf) $(libdw) $(libeu) $(argp_LDADD) |