From a5bc79c39b3ddec0115984ad22e71659eedf55ff Mon Sep 17 00:00:00 2001 From: Ivan Pavlov Date: Fri, 25 Sep 2026 10:37:36 +0300 Subject: [PATCH] tools/elfutils: update to 0.196 To reduce the size of the downloaded source files, the version of tools library has been aligned with the version used in the packages. Release notes: https://inbox.sourceware.org/elfutils-devel/CAJDtP-QXj15OOpBxLdU+V1PZKM8YmnsE1eVy-R2R5xbE7Shk5A@mail.gmail.com/T/#u Manually rebased patches: - 012-backport-mips-support-readelf.patch - 100-portability.patch Removed patches: - 001-fix-backport-iquote-include.patch - fixed in [1] - 110-objects-manifest.patch - upstreamed Include new submodule 'libdwfl_stacktrace' in makefile. Changes from 8f920d2 are rolled back after fix [1] 1. https://sourceware.org/bugzilla/show_bug.cgi?id=33103 Fixes: https://github.com/openwrt/openwrt/commit/8f920d2f94b0878e9b4291ffa18cfc9e02828f77 Signed-off-by: Ivan Pavlov Link: https://github.com/openwrt/openwrt/pull/25388 Signed-off-by: Robert Marko --- tools/elfutils/Makefile | 7 +- .../001-fix-backport-iquote-include.patch | 12 -- .../012-backport-mips-support-readelf.patch | 44 ++--- .../013-backport-mips-support-elflint.patch | 10 +- tools/elfutils/patches/100-portability.patch | 28 +-- .../patches/101-shared-conditional.patch | 26 +-- .../patches/110-objects-manifest.patch | 162 ------------------ 7 files changed, 59 insertions(+), 230 deletions(-) delete mode 100644 tools/elfutils/patches/001-fix-backport-iquote-include.patch delete mode 100644 tools/elfutils/patches/110-objects-manifest.patch diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile index 2fcc13fa5cb..fb2afe9d83a 100644 --- a/tools/elfutils/Makefile +++ b/tools/elfutils/Makefile @@ -3,12 +3,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils -PKG_VERSION:=0.192 +PKG_VERSION:=0.196 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) -PKG_HASH:=616099beae24aba11f9b63d86ca6cc8d566d968b802391334c91df54eab416b4 +PKG_HASH:=fd5cc6b77ad6773cac93cb3f415f9318ac3b3455eecf801f6b4a742c4f6c7209 PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3 @@ -27,6 +27,7 @@ PKG_SUBDIRS := \ libebl \ libdwelf \ libdwfl \ + libdwfl_stacktrace \ libdw \ src @@ -70,7 +71,7 @@ export $(PKG_GNULIB_BASE)_xsize=$(HOST_BUILD_DIR)/$(PKG_GNULIB_BASE)/$(PKG_GNULI HOST_MAKE_FLAGS += \ am__CONFIG_DISTCLEAN_FILES= \ - DEFAULT_INCLUDES='-iquote . -I$$$$(top_builddir) -I$$$$(top_srcdir)/$(PKG_GNULIB_BASE)' \ + DEFAULT_INCLUDES='-I. -I$$$$(top_builddir) -I$$$$(top_srcdir)/$(PKG_GNULIB_BASE)' \ AM_LDFLAGS='$$$$(STACK_USAGE_NO_ERROR)' \ LIBS+='$$$$(if $$$$(findstring $(lastword $(PKG_SUBDIRS)),$$$$(subdir)), $$$$($(PKG_GNULIB_BASE)))' \ LIBS+='$$$$(wildcard $$$$($(PKG_GNULIB_BASE)_exitfail))' \ diff --git a/tools/elfutils/patches/001-fix-backport-iquote-include.patch b/tools/elfutils/patches/001-fix-backport-iquote-include.patch deleted file mode 100644 index 62ed84dd27c..00000000000 --- a/tools/elfutils/patches/001-fix-backport-iquote-include.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -21,7 +21,8 @@ DEFS += $(YYDEBUG) -DDEBUGPRED=@DEBUGPRE - -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\" - - DEFAULT_INCLUDES = --AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -+AM_CPPFLAGS = -iquote . -iquote $(srcdir) -I$(top_srcdir)/lib \ -+ -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ - -I$(srcdir)/../libdw -I$(srcdir)/../libdwelf \ - -I$(srcdir)/../libdwfl -I$(srcdir)/../libasm -I../debuginfod - diff --git a/tools/elfutils/patches/012-backport-mips-support-readelf.patch b/tools/elfutils/patches/012-backport-mips-support-readelf.patch index 3a61acde6e0..dbff552fbcc 100644 --- a/tools/elfutils/patches/012-backport-mips-support-readelf.patch +++ b/tools/elfutils/patches/012-backport-mips-support-readelf.patch @@ -780,10 +780,10 @@ Signed-off-by: Ying Huang #endif /* libelfP.h */ --- a/src/readelf.c +++ b/src/readelf.c -@@ -2219,17 +2219,41 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr * - (long int) GELF_R_SYM (rel->r_info)); - } - else if (GELF_ST_TYPE (sym->st_info) != STT_SECTION) +@@ -2436,17 +2436,41 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr * + && GELF_ST_BIND (sym->st_info) == STB_LOCAL + && sym->st_shndx != SHN_UNDEF + && sym->st_value == 0)) // local start section label - printf (" %#0*" PRIx64 " %-20s %#0*" PRIx64 " %s\n", - class == ELFCLASS32 ? 10 : 18, rel->r_offset, - likely (ebl_reloc_type_check (ebl, @@ -832,8 +832,8 @@ Signed-off-by: Ying Huang + } else { - /* This is a relocation against a STT_SECTION symbol. */ -@@ -2253,16 +2277,40 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr * + /* This is a relocation against a STT_SECTION symbol +@@ -2472,16 +2496,40 @@ handle_relocs_rel (Ebl *ebl, GElf_Ehdr * (long int) (sym->st_shndx == SHN_XINDEX ? xndx : sym->st_shndx)); else @@ -884,10 +884,10 @@ Signed-off-by: Ying Huang } } } -@@ -2410,19 +2458,43 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr - (long int) GELF_R_SYM (rel->r_info)); - } - else if (GELF_ST_TYPE (sym->st_info) != STT_SECTION) +@@ -2634,19 +2682,43 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr + && GELF_ST_BIND (sym->st_info) == STB_LOCAL + && sym->st_shndx != SHN_UNDEF + && sym->st_value == 0)) // local start section label - printf ("\ + { + unsigned long inf = rel->r_info; @@ -939,8 +939,8 @@ Signed-off-by: Ying Huang + } else { - /* This is a relocation against a STT_SECTION symbol. */ -@@ -2446,18 +2518,42 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr + /* This is a relocation against a STT_SECTION symbol +@@ -2672,18 +2744,42 @@ handle_relocs_rela (Ebl *ebl, GElf_Ehdr (long int) (sym->st_shndx == SHN_XINDEX ? xndx : sym->st_shndx)); else @@ -994,7 +994,7 @@ Signed-off-by: Ying Huang } } } -@@ -12037,7 +12133,7 @@ print_debug (Dwfl_Module *dwflmod, Ebl * +@@ -12752,7 +12848,7 @@ print_debug (Dwfl_Module *dwflmod, Ebl * GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); @@ -1003,7 +1003,7 @@ Signed-off-by: Ying Huang { const char *name = elf_strptr (ebl->elf, shstrndx, shdr->sh_name); -@@ -12067,7 +12163,7 @@ print_debug (Dwfl_Module *dwflmod, Ebl * +@@ -12783,7 +12879,7 @@ print_debug (Dwfl_Module *dwflmod, Ebl * GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); @@ -1014,24 +1014,24 @@ Signed-off-by: Ying Huang { --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -216,7 +216,7 @@ TESTS = run-arextract.sh run-arsymtest.s +@@ -241,7 +241,7 @@ TESTS = run-arextract.sh run-arsymtest.s run-nvidia-extended-linemap-libdw.sh run-nvidia-extended-linemap-readelf.sh \ run-readelf-dw-form-indirect.sh run-strip-largealign.sh \ run-readelf-Dd.sh run-dwfl-core-noncontig.sh run-cu-dwp-section-info.sh \ - run-declfiles.sh \ + run-declfiles.sh run-readelf-reloc.sh \ - run-sysroot.sh - - if !BIARCH -@@ -684,7 +684,7 @@ EXTRA_DIST = run-arextract.sh run-arsymt + run-sysroot.sh \ + run-test-manyfuncs.sh \ + run-eu-search-cfi.sh run-eu-search-macros.sh \ +@@ -738,7 +738,7 @@ EXTRA_DIST = run-arextract.sh run-arsymt testfile-dwp-4-cu-index-overflow.bz2 \ testfile-dwp-4-cu-index-overflow.dwp.bz2 \ testfile-dwp-cu-index-overflow.source \ - testfile-define-file.bz2 \ + run-readelf-reloc.sh testfile-define-file.bz2 \ - testfile-sysroot.tar.bz2 run-sysroot.sh run-debuginfod-seekable.sh - - + testfile-sysroot.tar.bz2 run-sysroot.sh \ + run-test-manyfuncs.sh manyfuncs.c \ + run-debuginfod-seekable.sh thread-safety-subr.sh \ --- /dev/null +++ b/tests/run-readelf-reloc.sh @@ -0,0 +1,42 @@ diff --git a/tools/elfutils/patches/013-backport-mips-support-elflint.patch b/tools/elfutils/patches/013-backport-mips-support-elflint.patch index 2ef9304bd16..42f5172bbea 100644 --- a/tools/elfutils/patches/013-backport-mips-support-elflint.patch +++ b/tools/elfutils/patches/013-backport-mips-support-elflint.patch @@ -91,7 +91,7 @@ Signed-off-by: Ying Huang mips_machine_flag_check (GElf_Word flags) --- a/src/elflint.c +++ b/src/elflint.c -@@ -936,7 +936,9 @@ section [%2d] '%s': symbol %zu (%s): non +@@ -940,7 +940,9 @@ section [%2d] '%s': symbol %zu (%s): non } if (GELF_ST_TYPE (sym->st_info) == STT_SECTION @@ -102,7 +102,7 @@ Signed-off-by: Ying Huang ERROR (_("\ section [%2d] '%s': symbol %zu (%s): non-local section symbol\n"), idx, section_name (ebl, idx), cnt, name); -@@ -3829,6 +3831,10 @@ cannot get section header for section [% +@@ -3842,6 +3844,10 @@ cannot get section header for section [% && ebl_bss_plt_p (ebl)) good_type = SHT_NOBITS; @@ -113,7 +113,7 @@ Signed-off-by: Ying Huang /* In a debuginfo file, any normal section can be SHT_NOBITS. This is only invalid for DWARF sections and .shstrtab. */ if (shdr->sh_type != good_type -@@ -3989,12 +3995,21 @@ section [%2zu] '%s': size not multiple o +@@ -4006,12 +4012,21 @@ section [%2zu] '%s': size not multiple o ERROR (_("section [%2zu] '%s'" " contains invalid processor-specific flag(s)" " %#" PRIx64 "\n"), @@ -138,7 +138,7 @@ Signed-off-by: Ying Huang if (sh_flags != 0) ERROR (_("section [%2zu] '%s' contains unknown flag(s)" " %#" PRIx64 "\n"), -@@ -4060,6 +4075,7 @@ section [%2zu] '%s': merge flag set but +@@ -4077,6 +4092,7 @@ section [%2zu] '%s': merge flag set but switch (shdr->sh_type) { case SHT_PROGBITS: @@ -146,7 +146,7 @@ Signed-off-by: Ying Huang break; case SHT_NOBITS: -@@ -4717,7 +4733,7 @@ program header offset in ELF header and +@@ -4766,7 +4782,7 @@ program header offset in ELF header and if (shdr != NULL && ((is_debuginfo && shdr->sh_type == SHT_NOBITS) || (! is_debuginfo diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch index a82cd69ba23..89f24f82724 100644 --- a/tools/elfutils/patches/100-portability.patch +++ b/tools/elfutils/patches/100-portability.patch @@ -1,21 +1,23 @@ --- a/configure.ac +++ b/configure.ac -@@ -44,6 +44,7 @@ fi +@@ -38,6 +38,7 @@ fi AC_CONFIG_AUX_DIR([config]) AC_CONFIG_FILES([config/Makefile]) +AC_CONFIG_FILES([libgnu/Makefile]) - AC_COPYRIGHT([Copyright (C) 1996-2024 The elfutils developers.]) - AC_PREREQ(2.63) dnl Minimum Autoconf version required. -@@ -88,11 +89,14 @@ AS_IF([test "$use_locks" = yes], - - AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.]) + AC_COPYRIGHT([Copyright (C) 1996-2026 The elfutils developers.]) + AC_PREREQ(2.69) dnl Minimum Autoconf version required. +@@ -87,6 +88,8 @@ AS_IF([test "$use_locks" = yes], + [eu_thread_safe="/* _ELFUTILS_THREAD_SAFE is not defined. */"]) + AC_SUBST([eu_thread_safe]) +AC_USE_SYSTEM_EXTENSIONS() + - m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99]) - AC_PROG_CXX + # Provided by gnulib's m4/std-gnu11.m4 for autoconf pre 2.70 + AC_PROG_CC + AS_IF([test "x$ac_cv_prog_cc_c11" = "xno"], +@@ -95,6 +98,7 @@ AC_PROG_CXX AC_PROG_RANLIB AC_PROG_YACC AC_PROG_LEX([noyywrap]) @@ -23,7 +25,7 @@ # Only available since automake 1.12 m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_CHECK_TOOL([READELF], [readelf]) -@@ -646,6 +650,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], +@@ -727,6 +731,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], CFLAGS="$old_CFLAGS"]) AS_IF([test "x$ac_cv_fno_addrsig" = "xyes"], CFLAGS="$CFLAGS -fno-addrsig") @@ -162,7 +164,7 @@ +} --- a/backends/ppc_attrs.c +++ b/backends/ppc_attrs.c -@@ -81,6 +81,9 @@ ppc_check_object_attribute (Ebl *ebl __a +@@ -93,6 +93,9 @@ ppc_check_object_attribute (Ebl *ebl __a return false; } @@ -201,8 +203,8 @@ #include +#include - #include - #include + #include "libdw.h" + #include "dwarf.h" #include "eu-search.h" --- a/config/libdebuginfod.pc.in +++ b/config/libdebuginfod.pc.in @@ -257,7 +259,7 @@ result->check_special_symbol = default_check_special_symbol; result->data_marker_symbol = default_data_marker_symbol; result->check_st_other_bits = default_check_st_other_bits; -@@ -638,8 +636,6 @@ default_copy_reloc_p (int reloc __attrib +@@ -641,8 +639,6 @@ default_copy_reloc_p (int reloc __attrib { return false; } diff --git a/tools/elfutils/patches/101-shared-conditional.patch b/tools/elfutils/patches/101-shared-conditional.patch index 4eeee6a682a..fb3cf863b98 100644 --- a/tools/elfutils/patches/101-shared-conditional.patch +++ b/tools/elfutils/patches/101-shared-conditional.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -102,6 +102,8 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) +@@ -104,6 +104,8 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_CHECK_TOOL([READELF], [readelf]) AC_CHECK_TOOL([NM], [nm]) @@ -9,7 +9,7 @@ AC_CACHE_CHECK([whether gcc supports __attribute__((visibility()))], ac_cv_visibility, [dnl save_CFLAGS="$CFLAGS" -@@ -423,7 +425,10 @@ AS_HELP_STRING([--enable-install-elfh],[ +@@ -467,7 +469,10 @@ AS_HELP_STRING([--enable-install-elfh],[ AM_CONDITIONAL(INSTALL_ELFH, test "$install_elfh" = yes) AM_CONDITIONAL(BUILD_STATIC, [dnl @@ -23,7 +23,7 @@ AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]), --- a/libelf/Makefile.am +++ b/libelf/Makefile.am -@@ -35,8 +35,11 @@ endif +@@ -36,8 +36,11 @@ endif VERSION = 1 lib_LIBRARIES = libelf.a @@ -35,9 +35,9 @@ include_HEADERS = libelf.h gelf.h nlist.h noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ -@@ -122,11 +125,15 @@ libelf.so: $(srcdir)/libelf.map $(libelf - @$(textrel_check) - $(AM_V_at)ln -fs $@ $@.$(VERSION) +@@ -126,11 +129,15 @@ libelf.so: $(srcdir)/libelf.map $(libelf + libeu_objects = $(shell cat ../lib/libeu.manifest) + libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects)) +if BUILD_SHARED install: install-am libelf.so @@ -78,8 +78,8 @@ uninstall: uninstall-am rm -f $(DESTDIR)$(libdir)/libdw-$(PACKAGE_VERSION).so -@@ -147,6 +151,10 @@ libdw_a_LIBADD += $(addprefix ../backend - libcpu_objects = $(shell $(AR) t ../libcpu/libcpu.a) +@@ -150,6 +154,10 @@ libdw_a_LIBADD += $(addprefix ../backend + libcpu_objects = $(shell cat ../libcpu/libcpu.manifest) libdw_a_LIBADD += $(addprefix ../libcpu/,$(libcpu_objects)) +if !BUILD_SHARED @@ -152,7 +152,7 @@ rm -f $(DESTDIR)$(libdir)/$(LIBDEBUGINFOD_SONAME) --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -50,7 +50,7 @@ check_PROGRAMS = arextract arsymtest new +@@ -51,7 +51,7 @@ check_PROGRAMS = arextract arsymtest new dwfl-report-offline-memory \ varlocs backtrace backtrace-child \ backtrace-data backtrace-dwarf debuglink debugaltlink \ @@ -161,7 +161,7 @@ vdsosyms \ getsrc_die strptr newdata newzdata \ elfstrtab dwfl-proc-attach \ -@@ -181,7 +181,7 @@ TESTS = run-arextract.sh run-arsymtest.s +@@ -204,7 +204,7 @@ TESTS = run-arextract.sh run-arsymtest.s run-readelf-addr.sh run-readelf-str.sh \ run-readelf-multi-noline.sh \ run-readelf-types.sh \ @@ -170,9 +170,9 @@ run-linkmap-cut.sh run-aggregate-size.sh run-peel-type.sh \ vdsosyms run-readelf-A.sh \ run-getsrc-die.sh run-strptr.sh newdata newzdata \ -@@ -298,6 +298,11 @@ check_PROGRAMS += funcretval_test_struct - funcretval_test_struct_SOURCES = funcretval_test_struct.c - TESTS += run-funcretval-struct-native.sh +@@ -341,6 +341,11 @@ if HAVE_LIBPFM + export HAVE_LIBPFM = 1 + endif +if BUILD_SHARED +check_PROGRAMS += deleted deleted-lib.so diff --git a/tools/elfutils/patches/110-objects-manifest.patch b/tools/elfutils/patches/110-objects-manifest.patch deleted file mode 100644 index 35ef1311902..00000000000 --- a/tools/elfutils/patches/110-objects-manifest.patch +++ /dev/null @@ -1,162 +0,0 @@ ---- a/libdw/Makefile.am -+++ b/libdw/Makefile.am -@@ -136,19 +136,19 @@ uninstall: uninstall-am - rm -f $(DESTDIR)$(libdir)/libdw.so - rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils - --libdwfl_objects = $(shell $(AR) t ../libdwfl/libdwfl.a) -+libdwfl_objects = $(shell cat ../libdwfl/libdwfl.manifest) - libdw_a_LIBADD = $(addprefix ../libdwfl/,$(libdwfl_objects)) - --libdwelf_objects = $(shell $(AR) t ../libdwelf/libdwelf.a) -+libdwelf_objects = $(shell cat ../libdwelf/libdwelf.manifest) - libdw_a_LIBADD += $(addprefix ../libdwelf/,$(libdwelf_objects)) - --libebl_objects = $(shell $(AR) t ../libebl/libebl.a) -+libebl_objects = $(shell cat ../libebl/libebl.manifest) - libdw_a_LIBADD += $(addprefix ../libebl/,$(libebl_objects)) - --backends_objects = $(shell $(AR) t ../backends/libebl_backends.a) -+backends_objects = $(shell cat ../backends/libebl_backends.manifest) - libdw_a_LIBADD += $(addprefix ../backends/,$(backends_objects)) - --libcpu_objects = $(shell $(AR) t ../libcpu/libcpu.a) -+libcpu_objects = $(shell cat ../libcpu/libcpu.manifest) - libdw_a_LIBADD += $(addprefix ../libcpu/,$(libcpu_objects)) - - if !BUILD_SHARED -@@ -160,5 +160,10 @@ noinst_HEADERS = libdwP.h memory-access. - - EXTRA_DIST = libdw.map - --MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so libdw.so.$(VERSION) -+EXTRA_libdw_a_DEPENDENCIES = libdw.manifest -+ -+libdw.manifest: $(libdw_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) $(EXTRA_libdw_a_DEPENDENCIES) libdw.so libdw.so.$(VERSION) - MAINTAINERCLEANFILES = $(srcdir)/known-dwarf.h ---- a/libdwfl/Makefile.am -+++ b/libdwfl/Makefile.am -@@ -94,4 +94,10 @@ am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_S - - noinst_HEADERS = libdwflP.h - -+EXTRA_libdwfl_a_DEPENDENCIES = libdwfl.manifest -+ -+libdwfl.manifest: $(libdwfl_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(EXTRA_libdwfl_a_DEPENDENCIES) - CLEANFILES += $(am_libdwfl_pic_a_OBJECTS) ---- a/libdwelf/Makefile.am -+++ b/libdwelf/Makefile.am -@@ -54,4 +54,10 @@ libeu = ../lib/libeu.a - libdwelf_pic_a_SOURCES = - am_libdwelf_pic_a_OBJECTS = $(libdwelf_a_SOURCES:.c=.os) - -+EXTRA_libdwelf_a_DEPENDENCIES = libdwelf.manifest -+ -+libdwelf.manifest: $(libdwelf_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(EXTRA_libdwelf_a_DEPENDENCIES) - CLEANFILES += $(am_libdwelf_pic_a_OBJECTS) ---- a/libebl/Makefile.am -+++ b/libebl/Makefile.am -@@ -61,4 +61,9 @@ am_libebl_pic_a_OBJECTS = $(libebl_a_SOU - - noinst_HEADERS = libebl.h libeblP.h ebl-hooks.h - --MOSTLYCLEANFILES = $(am_libebl_pic_a_OBJECTS) -+EXTRA_libebl_a_DEPENDENCIES = libebl.manifest -+ -+libebl.manifest: $(libebl_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(am_libebl_pic_a_OBJECTS) $(EXTRA_libebl_a_DEPENDENCIES) ---- a/backends/Makefile.am -+++ b/backends/Makefile.am -@@ -122,4 +122,9 @@ am_libebl_backends_pic_a_OBJECTS = $(lib - noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c - EXTRA_DIST = $(modules:=_reloc.def) - --MOSTLYCLEANFILES = $(am_libebl_backends_pic_a_OBJECTS) -+EXTRA_libebl_backends_a_DEPENDENCIES = libebl_backends.manifest -+ -+libebl_backends.manifest: $(libebl_backends_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(am_libebl_backends_pic_a_OBJECTS) $(EXTRA_libebl_backends_a_DEPENDENCIES) ---- a/libcpu/Makefile.am -+++ b/libcpu/Makefile.am -@@ -101,6 +101,11 @@ bpf_disasm_CFLAGS = -Wno-format-nonliter - - EXTRA_DIST = defs/i386 - --MOSTLYCLEANFILES = $(am_libcpu_pic_a_OBJECTS) -+EXTRA_libcpu_a_DEPENDENCIES = libcpu.manifest -+ -+libcpu.manifest: $(libcpu_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(am_libcpu_pic_a_OBJECTS) $(EXTRA_libcpu_a_DEPENDENCIES) - CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics) - MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_dis.h) ---- a/libelf/Makefile.am -+++ b/libelf/Makefile.am -@@ -142,4 +142,10 @@ uninstall: uninstall-am - - EXTRA_DIST = libelf.map - -+EXTRA_libelf_a_DEPENDENCIES = libelf.manifest -+ -+libelf.manifest: $(libelf_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(EXTRA_libelf_a_DEPENDENCIES) - CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so libelf.so.$(VERSION) ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -42,3 +42,10 @@ noinst_HEADERS = fixedsizehash.h libeu.h - atomics.h stdatomic-fbsd.h dynamicsizehash_concurrent.h \ - eu-search.h locks.h - EXTRA_DIST = dynamicsizehash.c dynamicsizehash_concurrent.c -+ -+EXTRA_libeu_a_DEPENDENCIES = libeu.manifest -+ -+libeu.manifest: $(libeu_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(EXTRA_libeu_a_DEPENDENCIES) ---- a/libasm/Makefile.am -+++ b/libasm/Makefile.am -@@ -93,4 +93,10 @@ uninstall: uninstall-am - noinst_HEADERS = libasmP.h symbolhash.h - EXTRA_DIST = libasm.map - -+EXTRA_libasm_a_DEPENDENCIES = libasm.manifest -+ -+libasm.manifest: $(libasm_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(EXTRA_libasm_a_DEPENDENCIES) - CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so libasm.so.$(VERSION) ---- a/debuginfod/Makefile.am -+++ b/debuginfod/Makefile.am -@@ -132,7 +132,13 @@ uninstall: uninstall-am - endif - - EXTRA_DIST = libdebuginfod.map --MOSTLYCLEANFILES = $(am_libdebuginfod_pic_a_OBJECTS) $(LIBDEBUGINFOD_SONAME) -+ -+EXTRA_libdebuginfod_a_DEPENDENCIES = libdebuginfod.manifest -+ -+libdebuginfod.manifest: $(libdebuginfod_a_OBJECTS) -+ echo $^ > $@ -+ -+MOSTLYCLEANFILES = $(am_libdebuginfod_pic_a_OBJECTS) $(LIBDEBUGINFOD_SONAME) $(EXTRA_libdebuginfod_a_DEPENDENCIES) - CLEANFILES += $(am_libdebuginfod_pic_a_OBJECTS) libdebuginfod.so - - # automake std-options override: arrange to pass LD_LIBRARY_PATH