From 6f5ec96bad3991f82660aac774e31c8a35f6ac9a Mon Sep 17 00:00:00 2001 From: liweigang Date: Mon, 3 Mar 2025 13:56:10 +0800 Subject: [PATCH] add sw_64 support Signed-off-by: liweigang (cherry picked from commit cac24c49c0aa15fb6be78490e0cc7e0aaa37d820) --- add-sw_64-support.patch | 24 ++++++++++++++++++++++++ debugedit.spec | 7 ++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 add-sw_64-support.patch diff --git a/add-sw_64-support.patch b/add-sw_64-support.patch new file mode 100644 index 0000000..ee84906 --- /dev/null +++ b/add-sw_64-support.patch @@ -0,0 +1,24 @@ +From 5d5b6fae22f4bc7627009ea171534c115b5f5677 Mon Sep 17 00:00:00 2001 +From: mahailiang +Date: Wed, 30 Oct 2024 21:33:17 +0800 +Subject: [PATCH] add sw_64 support +--- + tools/debugedit.c | 4 ++++ + 1 file changed, 4 insertions(+) +diff --git a/tools/debugedit.c b/tools/debugedit.c +index 216e2fa..0067238 100644 +--- a/tools/debugedit.c ++++ b/tools/debugedit.c +@@ -598,6 +598,10 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype) + if (rtype != R_X86_64_32) + goto fail; + break; ++ case EM_SW_64: ++ if (rtype != R_SW_64_REFLONG) ++ goto fail; ++ break; + case EM_ALPHA: + if (rtype != R_ALPHA_REFLONG) + goto fail; +-- +2.20.1 diff --git a/debugedit.spec b/debugedit.spec index 5719798..a7ef5a9 100644 --- a/debugedit.spec +++ b/debugedit.spec @@ -1,6 +1,6 @@ Name: debugedit Version: 5.1 -Release: 3 +Release: 4 Summary: Tools for debuginfo creation License: GPL-2.0-or-later and LGPL-2.1-only and GPL-3.0-only Group: Applications @@ -30,6 +30,8 @@ Patch1: find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch Patch6001: backport-tests-Ignore-stderr-output-of-readelf-in-debugedit.a.patch Patch6002: backport-find-debuginfo-Check-files-are-writable-before-modif.patch +Patch9000: add-sw_64-support.patch + %description Debugedit provides programs and scripts for creating debuginfo and source file distributions, collect build-ids and rewrite source @@ -63,6 +65,9 @@ sed -i 's/^\(C\|LD\)FLAGS=.*/\1FLAGS=""/' tests/atlocal %{_mandir}/man1/find-debuginfo.1* %changelog +* Mon Mar 03 2025 liweigang - 5.1-4 +- add sw_64 support + * Tue Dec 10 2024 Funda Wang - 5.1-3 - backport upstream patch checking files writable before modifying them -- Gitee