debugedit: Do not 'edit_dwarf2' when just extracting build-id
authorVitaly Chikunov <vt@altlinux.org>
Sat, 14 Nov 2020 15:14:28 +0000 (18:14 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 23 Nov 2020 12:39:55 +0000 (14:39 +0200)
No need to call edit_dwarf2() if debugedit is invoked just to extract
build-id (with `-i -n'). Otherwise, we will get `DWARF version 0
unhandled' warning for compressed .debug files:

  /usr/lib/rpm/debugedit: ./usr/lib/debug/...e.ko.debug: DWARF version 0 unhandled

Context: We have kernel modules elfcompressed in ALT.

tools/debugedit.c

index c2884933c2e4e9dd7040a41e82c1e47f23094043..e9d8f3ae74744d50ac542570eabd8576e315d46e 100644 (file)
@@ -2865,7 +2865,8 @@ main (int argc, char *argv[])
              fprintf (stderr, "Stabs debuginfo not supported: %s\n", file);
              break;
            }
-         if (strcmp (name, ".debug_info") == 0)
+         if (!(do_build_id && no_recompute_build_id && !base_dir && !dest_dir)
+             && strcmp (name, ".debug_info") == 0)
            edit_dwarf2 (dso);
 
          break;
This page took 0.102438 seconds and 5 git commands to generate.