debugedit warns about unknown sections DWARF DW_FORM_0x1f20 and DWARF DW_FORM_0x1f21, when called for a binary which has been processed by dwz. These warnings should not be emitted when debugedit is just called to change the build-id.
(In reply to Matthias Klose from comment #0) > debugedit warns about unknown sections DWARF DW_FORM_0x1f20 and DWARF > DW_FORM_0x1f21, when called for a binary which has been processed by dwz. > > These warnings should not be emitted when debugedit is just called to change > the build-id. How exactly are you calling debugedit? Which arguments are used? And what exact warning do you see? unknown section names or unknown DWARF FORMs? In theory warnings about unknown forms should only be emitted when edit_dwarf2 is called. Which is guarded by: if (!(do_build_id && no_recompute_build_id && !base_dir && !dest_dir) && name != NULL && strcmp (name, ".debug_info") == 0) edit_dwarf2 (dso);
I believe it's called by debhelper/dh_strip like this: debugedit --build-id --build-id-seed=$seed $file https://git.launchpad.net/ubuntu/+source/debhelper/tree/dh_strip#n300
(In reply to Loïc Minier from comment #2) > I believe it's called by debhelper/dh_strip like this: > debugedit --build-id --build-id-seed=$seed $file > > https://git.launchpad.net/ubuntu/+source/debhelper/tree/dh_strip#n300 Aha, I see the logic for when to skip parsing the DIE tree is wrong. It only skips dwarf_edit2 when debugedit is invoked with -n -i and no base and destdir are given, but it should skip calling dwarf_edit2 when no base and dessst dir are given and we aren't listing the source files.
commit 379b2b95df49d6cebedad3562391c3350882f1a3 Author: Mark Wielaard <mark@klomp.org> Date: Wed Dec 28 22:23:01 2022 +0100 debugedit: Skip calling edit_dwarf2 if not rewriting and/or listing source We skipped calling edit_dwarf2 when no base and dest dir were given and debugedit was invoked with -i -n. But we never need to call edit_dwarf2 if we aren't rewriting paths and we don't want to list the source files. * tools/debugedit.c (main): Adjust edit_dwarf2 call guard. https://sourceware.org/bugzilla/show_bug.cgi?id=27639