From c9fbf0942999c58fe44b682ec0d4157fa56e5b2b Mon Sep 17 00:00:00 2001 From: lijian1 Date: Fri, 10 Oct 2025 14:29:07 +0800 Subject: [PATCH] modify loongarch64 support in symbols.c 4 elf64 --- ...ngarch64-support-in-symbols.c-4elf64.patch | 40 +++++++++++++++++++ crash.spec | 7 +++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 9002-modify-loongarch64-support-in-symbols.c-4elf64.patch diff --git a/9002-modify-loongarch64-support-in-symbols.c-4elf64.patch b/9002-modify-loongarch64-support-in-symbols.c-4elf64.patch new file mode 100644 index 0000000..fc72c07 --- /dev/null +++ b/9002-modify-loongarch64-support-in-symbols.c-4elf64.patch @@ -0,0 +1,40 @@ +From cb6f04f977a2fcfe6bba71ad04cd05377f7cb412 Mon Sep 17 00:00:00 2001 +From: lijian1 +Date: Fri, 10 Oct 2025 14:15:43 +0800 +Subject: [PATCH] modify loongarch64 support in symbols.c from elf32 to elf64 + +--- + symbols.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/symbols.c b/symbols.c +index 944a8af..32a34a4 100644 +--- a/symbols.c ++++ b/symbols.c +@@ -4502,10 +4502,6 @@ is_shared_object(char *file) + if (machine_type("PPC")) + return TRUE; + break; +- case EM_LOONGARCH: +- if (machine_type("LOONGARCH64")) +- return TRUE; +- break; + } + + if (CRASHDEBUG(1)) +@@ -4558,6 +4554,12 @@ is_shared_object(char *file) + if (machine_type("RISCV64")) + return TRUE; + break; ++ ++ case EM_LOONGARCH: ++ if (machine_type("LOONGARCH64")) ++ return TRUE; ++ break; ++ + } + + if (CRASHDEBUG(1)) +-- +2.43.0 + diff --git a/crash.spec b/crash.spec index f314c5b..49e18b0 100644 --- a/crash.spec +++ b/crash.spec @@ -1,6 +1,6 @@ Name: crash Version: 8.0.4 -Release: 16 +Release: 17 Summary: Linux kernel crash utility. License: GPLv3 URL: https://crash-utility.github.io @@ -18,6 +18,7 @@ Patch7: 0007-arm64-fix-SDEI-stack-frame-unwind-while-UNW_4_14-is-.patch Patch8: 0008-Fix-segmentation-fault-in-value_search_module_6_4.patch Patch9: backport-fix-for-sys-to-properly-display-the-PANIC-m.patch Patch9001: huawei-fix-ps-error-when-mm_struct.rss_stat-is-lazy-initial.patch +Patch9002: 9002-modify-loongarch64-support-in-symbols.c-4elf64.patch BuildRequires: ncurses-devel zlib-devel lzo-devel snappy-devel texinfo libzstd-devel BuildRequires: gcc gcc-c++ bison m4 @@ -60,6 +61,7 @@ created by manufacturer-specific firmware. %ifarch loongarch64 %patch 3 -p1 %patch 4 -p1 +%patch 9002 -p1 %endif %patch 5 -p1 @@ -102,6 +104,9 @@ install -D -m 0644 defs.h %{buildroot}%{_includedir}/%{name}/defs.h %{_mandir}/man8/crash.8* %changelog +* Fri Oct 10 2025 lijian1 - 8.0.4-17 +- fix loongarch64 support so file extension error for elf64 lack the branch while elf32 do not need. + * Fri Aug 01 2025 wangxiao - 8.0.4-16 - backport fix for 'sys' to properly display the PANIC message patch -- Gitee