All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
To: openembedded-core@lists.openembedded.org
Cc: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Subject: [PATCH v2] elfutils: upgrade 0.195 -> 0.196
Date: Wed, 19 Aug 2026 12:57:24 +0200	[thread overview]
Message-ID: <20260819105724.61332-1-jaipaul.cheernam@est.tech> (raw)

Source: NEWS

Version 0.196 "Split Personality"

debuginfod: The $DEBUGINFOD_TIMEOUT environment variable is now enforced
            when establishing a connection to a server.

libdw: New functions dwarf_begin_type, dwarf_begin_elf_type and
       dwarf_get_type plus new enum Dwarf_Type.  Used to select between
       plain DWARF, split DWARF (.dwo/.dwp) and GNU LTO when opening a
       file.

       Added support for DWARF5 supplementary files (.debug_sup) and
       associated DW_FORM_ref_sup4/8 and DW_FORM_strp_sup forms.

       Added support for split DWARF debug data when contained in the
       same file as the skeleton.

libdwelf: New functions dwelf_dwarf_debug_sup and dwelf_dwarf_debug_dwp
          for querying .debug_sup and .debug_dwp section data.

libdwfl: Now correctly handles Linux kernel module sections that are
         not present in sysfs.

libdwfl_stacktrace: New functions dwflst_arch_from_uname,
                    dwflst_arch_expected_frame_nregs,
                    dwflst_arch_sp_dwarf_reg and dwflst_arch_sp_perf_reg
                    providing per-architecture constants.  The
                    libdwfl_stacktrace interface is experimental and may
                    be subject to API/ABI changes.

stackprof: New profiling tool for collecting systemwide stacktrace
           profiles.  Replaces the eu-stacktrace tool.  Requires
           a C++20 capable compiler.

stacktrace: This experimental tool has been removed and replaced with
            eu-stackprof.

srcfiles: Now handles CU names and files from split DWARF.

strip: Fixed bug where a section's sh_link or sh_info reference could
       be missing from the debug file.

version.h: New macro _ELFUTILS_THREAD_SAFE added to <elfutils/version.h>.
           Defined to 1 when the elfutils libraries are built with thread
           safety support enabled.  Otherwise it is left undefined.
           Thread safety support is experimental and is not yet officially
           supported.

Dropped patches:
0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch
  Backported in b4bd2a2bf6 for 0.192 from upstream commit [1].
  A later upstream commit [2] replaced the $(AR) t approach with a
  libeu.manifest file. Both [1] and [2] landed in upstream 0.193,
  making the backport redundant since 0.193. Verified libelf.a
  contains eu-search.o after build without the patch.

Refreshed patches:
0003-musl-utils.patch (resolved conflict in src/elfcompress.c)

- install libdw.a into ptest, needed by the new elf-from-memory test
- Add stackprof to install

- Add run-stackprof-system.sh and run-stackprof-system-gprof.sh to
PTEST_XFAILS for qemuall. These tests need userspace CPU activity to collect samples,
which minimal qemu images lack.Reported to upsteam [3]

[1] https://sourceware.org/git/?p=elfutils.git;a=commit;h=f5d6e088f84dd05278c4698a21cbf1ff4569978d
[2] https://sourceware.org/git/?p=elfutils.git;a=commit;h=4eff110a60cb9c7b77884c61f5925fe844c52acb
[3] https://sourceware.org/bugzilla/show_bug.cgi?id=34544

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
---
Changes in v2:
- Install libdw.a for ptest (new elf-from-memory test needs it)
- Add stackprof to ptest (new tool in 0.196)
- XFAIL stackprof systemwide tests on qemu (no userspace activity)
---
 .../{elfutils_0.195.bb => elfutils_0.196.bb}  |  9 +++--
 ...001-config-eu.am-do-not-force-Werror.patch |  4 +--
 ...u-objects-to-libelf.a-static-archive.patch | 35 -------------------
 ...-check-data_list.data.d.d_buf-before.patch |  2 +-
 ...-skip-the-test-when-gcc-not-deployed.patch |  2 +-
 ...m-compile-test_nlist-with-standard-C.patch |  6 ++--
 ...cvt_gunhash-if-dest-and-src-are-same.patch |  2 +-
 .../elfutils/files/0003-fixheadercheck.patch  |  2 +-
 .../elfutils/files/0003-musl-utils.patch      | 12 +++----
 .../elfutils/files/ptest.patch                |  8 ++---
 10 files changed, 25 insertions(+), 57 deletions(-)
 rename meta/recipes-devtools/elfutils/{elfutils_0.195.bb => elfutils_0.196.bb} (95%)
 delete mode 100644 meta/recipes-devtools/elfutils/files/0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch

diff --git a/meta/recipes-devtools/elfutils/elfutils_0.195.bb b/meta/recipes-devtools/elfutils/elfutils_0.196.bb
similarity index 95%
rename from meta/recipes-devtools/elfutils/elfutils_0.195.bb
rename to meta/recipes-devtools/elfutils/elfutils_0.196.bb
index 2093e1e924..e0b188ce8e 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.195.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.196.bb
@@ -19,12 +19,11 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
            file://ptest.patch \
            file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
            file://0001-config-eu.am-do-not-force-Werror.patch \
-           file://0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch \
            "
 SRC_URI:append:libc-musl = " \
            file://0003-musl-utils.patch \
            "
-SRC_URI[sha256sum] = "37629fdf7f1f3dc2818e138fca2b8094177d6c2d0f701d3bb650a561218dc026"
+SRC_URI[sha256sum] = "fd5cc6b77ad6773cac93cb3f415f9318ac3b3455eecf801f6b4a742c4f6c7209"
 
 inherit autotools gettext ptest pkgconfig
 
@@ -65,10 +64,12 @@ PTEST_XFAILS ?= ""
 # See - https://sourceware.org/bugzilla/show_bug.cgi?id=32232
 PTEST_XFAILS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' run-strip-strmerge.sh run-elflint-self.sh run-backtrace-data.sh run-reverse-sections-self.sh', '', d)}"
 PTEST_XFAILS:append:libc-musl = " run-large-elf-file.sh run-backtrace-data.sh run-backtrace-native.sh run-stack-d-test.sh run-stack-i-test.sh run-stack-demangled-test.sh run-deleted.sh run-compress-test.sh"
+# systemwide stackprof tests need userspace CPU activity, which minimal qemu images lack
+PTEST_XFAILS:append:qemuall = " run-stackprof-system.sh run-stackprof-system-gprof.sh"
 
 do_install_ptest() {
 	# copy the files which needed by the cases
-	TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip srcfiles"
+	TEST_FILES="strip strip.o addr2line elfcmp objdump readelf size.o nm.o nm elflint elfcompress elfclassify stack unstrip srcfiles stackprof"
 	install -d -m 755                       ${D}${PTEST_PATH}/src
 	install -d -m 755                       ${D}${PTEST_PATH}/config
 	install -d -m 755                       ${D}${PTEST_PATH}/lib
@@ -90,6 +91,7 @@ do_install_ptest() {
 	cp ${B}/libcpu/libcpu.a ${D}${PTEST_PATH}/libcpu/
 	cp ${B}/libebl/libebl.a ${D}${PTEST_PATH}/libebl/
 	cp ${B}/lib/libeu.a ${D}${PTEST_PATH}/lib/
+	cp ${B}/libdw/libdw.a ${D}${PTEST_PATH}/libdw/
 	cp ${S}/libelf/*.h             ${D}${PTEST_PATH}/libelf/
 	cp ${S}/libdw/*.h              ${D}${PTEST_PATH}/libdw/
 	cp ${S}/libdwfl/*.h            ${D}${PTEST_PATH}/libdwfl/
@@ -169,6 +171,7 @@ INHIBIT_PACKAGE_STRIP_FILES = "\
     ${PKGD}${PTEST_PATH}/src/stack \
     ${PKGD}${PTEST_PATH}/src/unstrip \
     ${PKGD}${PTEST_PATH}/src/srcfiles \
+    ${PKGD}${PTEST_PATH}/src/stackprof \
     ${PKGD}${PTEST_PATH}/libelf/libelf.so \
     ${PKGD}${PTEST_PATH}/libdw/libdw.so \
     ${PKGD}${PTEST_PATH}/libasm/libasm.so \
diff --git a/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
index 0149c64602..d460f2e58b 100644
--- a/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
+++ b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
@@ -1,4 +1,4 @@
-From 5a82f181583e02e19ed739a195801032532474bf Mon Sep 17 00:00:00 2001
+From 975357f7585076a072f61684db20180ef8dd31b7 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex@linutronix.de>
 Date: Fri, 22 Nov 2024 12:50:48 +0100
 Subject: [PATCH] config/eu.am: do not force -Werror
@@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex@linutronix.de>
  1 file changed, 2 deletions(-)
 
 diff --git a/config/eu.am b/config/eu.am
-index 321591f..a1748a8 100644
+index 4ea7251..2b688b3 100644
 --- a/config/eu.am
 +++ b/config/eu.am
 @@ -135,7 +135,6 @@ AM_CFLAGS = -Wall -Wshadow -Wformat=2 \
diff --git a/meta/recipes-devtools/elfutils/files/0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch b/meta/recipes-devtools/elfutils/files/0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch
deleted file mode 100644
index c2571c27f9..0000000000
--- a/meta/recipes-devtools/elfutils/files/0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From ad94a59ebcc32f71853716aff650997076d112df Mon Sep 17 00:00:00 2001
-From: Mark Wielaard <mark@klomp.org>
-Date: Tue, 22 Oct 2024 15:03:42 +0200
-Subject: [PATCH] libelf: Add libeu objects to libelf.a static archive
-
-libelf might use some symbols from libeu.a, specifically the eu-search
-wrappers. But we don't ship libeu.a separately. So include the libeu
-objects in the libelf.a archive to facilitate static linking.
-
-	* libelf/Makefile.am (libeu_objects): New variable.
-	(libelf_a_LIBADD): New, add libeu_objects.
-
-https://sourceware.org/bugzilla/show_bug.cgi?id=32293
-
-Signed-off-by: Mark Wielaard <mark@klomp.org>
-Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
-Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=f5d6e088f84dd05278c4698a21cbf1ff4569978d]
----
- libelf/Makefile.am | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libelf/Makefile.am b/libelf/Makefile.am
-index cc539c8..156a486 100644
---- a/libelf/Makefile.am
-+++ b/libelf/Makefile.am
-@@ -126,6 +126,9 @@ libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
- libeu_objects = $(shell cat ../lib/libeu.manifest)
- libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects))
- 
-+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
diff --git a/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch b/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch
index 297cf19ccb..621be1b37d 100644
--- a/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch
+++ b/meta/recipes-devtools/elfutils/files/0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch
@@ -1,4 +1,4 @@
-From 6b339ad9f9084b653b0d0c3823c871a7a9774b63 Mon Sep 17 00:00:00 2001
+From bf22ef3c1a559dc0b265a9c7c2fcda4a20519e63 Mon Sep 17 00:00:00 2001
 From: Robert Yang <liezhi.yang@windriver.com>
 Date: Thu, 16 Aug 2018 09:58:26 +0800
 Subject: [PATCH] libelf/elf_end.c: check data_list.data.d.d_buf before free it
diff --git a/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
index 7a9e1fbcdd..093d03c736 100644
--- a/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
+++ b/meta/recipes-devtools/elfutils/files/0001-skip-the-test-when-gcc-not-deployed.patch
@@ -1,4 +1,4 @@
-From 168f8b6e37a762a6263c279d95fee9346e1f44ca Mon Sep 17 00:00:00 2001
+From db59c8a80a285f9cba3f789b6c2c240481b97db8 Mon Sep 17 00:00:00 2001
 From: Mingli Yu <Mingli.Yu@windriver.com>
 Date: Tue, 21 May 2019 15:20:34 +0800
 Subject: [PATCH] skip the test when gcc not deployed
diff --git a/meta/recipes-devtools/elfutils/files/0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch b/meta/recipes-devtools/elfutils/files/0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch
index 455704b065..eb2d48e3bb 100644
--- a/meta/recipes-devtools/elfutils/files/0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch
+++ b/meta/recipes-devtools/elfutils/files/0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch
@@ -1,4 +1,4 @@
-From 7355ed2e9d0e1f38ab87f115011ab498388b4a41 Mon Sep 17 00:00:00 2001
+From aba735bf19c60ff85731b3bfe79a6c83e17f3436 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 23 Jun 2020 07:49:35 +0000
 Subject: [PATCH] tests/Makefile.am: compile test_nlist with standard CFLAGS
@@ -13,10 +13,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 946c7d2e..32590f6 100644
+index 055fea7..ba25e61 100644
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
-@@ -118,7 +118,7 @@ endif
+@@ -122,7 +122,7 @@ endif
  test-nlist$(EXEEXT): test-nlist.c
  	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
  	  $(AM_CPPFLAGS) $(CPPFLAGS) \
diff --git a/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch b/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
index b02f8e4c08..cc4c5ab75b 100644
--- a/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
+++ b/meta/recipes-devtools/elfutils/files/0002-Fix-elf_cvt_gunhash-if-dest-and-src-are-same.patch
@@ -1,4 +1,4 @@
-From ad1bf27f823db8a48e1e64ecce2e6998e990dc41 Mon Sep 17 00:00:00 2001
+From 0533b0d67ed99fd2a034e497f0c07ff608ca52e7 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Tue, 15 Aug 2017 17:13:59 +0800
 Subject: [PATCH] Fix elf_cvt_gunhash if dest and src are same.
diff --git a/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch b/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
index fd0efe595d..41e4c738f3 100644
--- a/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
+++ b/meta/recipes-devtools/elfutils/files/0003-fixheadercheck.patch
@@ -1,4 +1,4 @@
-From 7b48ae456de3e2f2a94f91c800b238788d5fd277 Mon Sep 17 00:00:00 2001
+From 78415c6fc1f464e45222ba588a6cdc0292b4230a Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Tue, 15 Aug 2017 17:17:20 +0800
 Subject: [PATCH] fixheadercheck
diff --git a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
index 21073716a0..a5d913b2b7 100644
--- a/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
+++ b/meta/recipes-devtools/elfutils/files/0003-musl-utils.patch
@@ -1,4 +1,4 @@
-From efa2836719b669c3200a615898627f6b6a4dd570 Mon Sep 17 00:00:00 2001
+From 0064679018642a9e0e2c9d36eeeedc3a8278356e Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Fri, 23 Aug 2019 10:19:48 +0800
 Subject: [PATCH] musl-utils
@@ -38,12 +38,12 @@ index d4a4221..f6336d9 100644
  /* State of -D/-U flags.  */
  extern bool arlib_deterministic_output;
 diff --git a/src/elfcompress.c b/src/elfcompress.c
-index f771b92..263de62 100644
+index 7818cce..ed3654b 100644
 --- a/src/elfcompress.c
 +++ b/src/elfcompress.c
-@@ -37,6 +37,13 @@
- #include "libeu.h"
- #include "printversion.h"
+@@ -41,6 +41,13 @@
+ /* Really should come from libgen.h, but we poisoned basename in system.h.  */
+ extern char *dirname(char *path);
  
 +#if !defined(ALLPERMS)
 +# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
@@ -56,7 +56,7 @@ index f771b92..263de62 100644
  ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
  
 diff --git a/src/strip.c b/src/strip.c
-index 20cc8a2..2ce52e8 100644
+index a8ecc80..bf88051 100644
 --- a/src/strip.c
 +++ b/src/strip.c
 @@ -45,6 +45,13 @@
diff --git a/meta/recipes-devtools/elfutils/files/ptest.patch b/meta/recipes-devtools/elfutils/files/ptest.patch
index ebf1d3f4c2..b6a9e5bb73 100644
--- a/meta/recipes-devtools/elfutils/files/ptest.patch
+++ b/meta/recipes-devtools/elfutils/files/ptest.patch
@@ -1,4 +1,4 @@
-From eeafa586990429f440eb2dbd9b4231edff6ae904 Mon Sep 17 00:00:00 2001
+From abe164f6242825e827b6b13141883591d059d6fe Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Wed, 1 May 2019 16:37:48 +0100
 Subject: [PATCH] Changes to allow ptest to run standalone on target:
@@ -21,7 +21,7 @@ Upstream-Status: Inappropriate [oe specific]
  3 files changed, 3 insertions(+), 7 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 80c7fd8..3e31485 100644
+index b0d1b48..acc29f0 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -43,7 +43,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2026 The elfutils developers.])
@@ -34,10 +34,10 @@ index 80c7fd8..3e31485 100644
  
  AM_SILENT_RULES([yes])
 diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 9a00541..946c7d2e 100644
+index 137e961..055fea7 100644
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
-@@ -943,3 +943,5 @@ check: check-am coverage
+@@ -981,3 +981,5 @@ check: check-am coverage
  coverage:
  	-$(srcdir)/coverage.sh
  endif


             reply	other threads:[~2026-08-19 10:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 10:57 Jaipaul Cheernam [this message]
2026-08-21  6:30 ` [OE-core] [PATCH v2] elfutils: upgrade 0.195 -> 0.196 Richard Purdie
2026-08-21  6:50   ` Jaipaul Cheernam
2026-08-21  8:26     ` Jaipaul Cheernam
2026-08-21  9:53       ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260819105724.61332-1-jaipaul.cheernam@est.tech \
    --to=jaipaul.cheernam@est.tech \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.