From 52643a1a7345f36e1471a701ae9b8b1d56235c0f Mon Sep 17 00:00:00 2001 From: Eustace Date: Thu, 10 Aug 2023 16:45:32 +0800 Subject: [PATCH] Mitigate error kernel building after v6.4 --- Encode-DW_TAG_unspecified_type.patch | 11 +++++++++++ dwarves.spec | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Encode-DW_TAG_unspecified_type.patch diff --git a/Encode-DW_TAG_unspecified_type.patch b/Encode-DW_TAG_unspecified_type.patch new file mode 100644 index 0000000..89b4cdf --- /dev/null +++ b/Encode-DW_TAG_unspecified_type.patch @@ -0,0 +1,11 @@ +--- dwarves-1.22/btf_encoder.c.orig 2023-08-10 00:54:22.033624325 +0800 ++++ dwarves-1.22/btf_encoder.c 2023-08-10 00:54:56.273111827 +0800 +@@ -856,6 +856,8 @@ + return btf_encoder__add_enum_type(encoder, tag); + case DW_TAG_subroutine_type: + return btf_encoder__add_func_proto(encoder, tag__ftype(tag), type_id_off); ++ case DW_TAG_unspecified_type: ++ return btf_encoder__add_ref_type(encoder, BTF_KIND_CONST, 0, NULL, false); + default: + fprintf(stderr, "Unsupported DW_TAG_%s(0x%x)\n", + dwarf_tag_name(tag->tag), tag->tag); diff --git a/dwarves.spec b/dwarves.spec index 09d6635..772f922 100644 --- a/dwarves.spec +++ b/dwarves.spec @@ -4,7 +4,7 @@ Name: dwarves Version: 1.22 -Release: 2 +Release: 3 License: GPLv2 Summary: Debugging Information Manipulation Tools URL: http://acmel.wordpress.com @@ -18,6 +18,7 @@ BuildRequires: elfutils-devel >= 0.170 Patch0: replace-deprecated-libbpf-APIs-with-new-ones.patch Patch1: backport-dwarf_loader-Support-DW_TAG_label-outside-DW_TAG_lex.patch +Patch2: Encode-DW_TAG_unspecified_type.patch %description dwarves is a set of tools that use the debugging information inserted in @@ -85,6 +86,9 @@ make install DESTDIR=%{buildroot} %{_libdir}/%{libname}_reorganize.so %changelog +* Thu Aug 10 2023 Eustace - 1.22-3 +- DESC: mitigate error kernel building after v6.4 + * Mon Mar 21 2022 - Kai Liu - 1.22-2 - Type:bugfix - ID:NA -- Gitee