summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2020-11-14 18:14:28 +0300
committerPanu Matilainen <pmatilai@redhat.com>2020-12-10 13:28:07 +0200
commit13a5c0c8962613e4e2c2ac9932f4171a67bd545b (patch)
tree69f300683a8cf10943fb85e1f95ddab67a135dba
parent8dc62c7dbdae10d1ea4b210e9f75f36eb4c16aa1 (diff)
downloadrpm-13a5c0c8962613e4e2c2ac9932f4171a67bd545b.tar.gz
debugedit: Do not 'edit_dwarf2' when just extracting build-id
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. (cherry picked from commit e526a0af17455c8233a793998daa787f58f35500)
-rw-r--r--tools/debugedit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/debugedit.c b/tools/debugedit.c
index 9f8dcd0fb..6bea88551 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -2825,7 +2825,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;