add sw_64 support

Signed-off-by: liweigang <liweiganga@uniontech.com>
(cherry picked from commit d0db9f95eb1b6575046ffd618901299a8af1fe97)
This commit is contained in:
liweigang 2025-02-27 16:23:11 +08:00 committed by openeuler-sync-bot
parent b49248b66b
commit 14be23854c
2 changed files with 32 additions and 1 deletions

24
add-sw_64-support.patch Normal file
View File

@ -0,0 +1,24 @@
From 5d5b6fae22f4bc7627009ea171534c115b5f5677 Mon Sep 17 00:00:00 2001
From: mahailiang <mahailiang@uniontech.com>
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

View File

@ -1,6 +1,6 @@
Name: debugedit
Version: 5.0
Release: 9
Release: 10
Summary: Tools for debuginfo creation
License: GPL-2.0-or-later and LGPL-2.1-only and GPL-3.0-only
Group: Applications
@ -26,6 +26,7 @@ Patch6002: backport-find-debuginfo-remove-duplicate-filenames-when-creat.patch
Patch6003: backport-find-debuginfo.sh-Exit-with-real-exit-status-in-para.patch
Patch6004: backport-find-debuginfo-Check-files-are-writable-before-modif.patch
Patch9000: add-loongarch-support-for-debugedit.patch
Patch9001: add-sw_64-support.patch
%description
Debugedit provides programs and scripts for creating debuginfo and
@ -44,6 +45,9 @@ paths in DWARF data for debugging, tracing and profiling.
%ifarch loongarch64
%patch9000 -p1
%endif
%ifarch sw_64
%patch9001 -p1
%endif
%build
autoreconf -f -v -i
@ -79,6 +83,9 @@ make check %{?_smp_mflags}
%{_rpmconfigdir}/debugedit
%changelog
* Thu Feb 27 2025 liweigang <liweiganga@uniontech.com> - 5.0-10
- add sw_64 support
* Thu Dec 12 2024 hugel <gengqihu2@h-partners.com> - 5.0-9
- backport patches from upstream