From 686b25d2ae3e71d9890240a69b2148b68bde488a Mon Sep 17 00:00:00 2001 From: Weisson Date: Mon, 27 May 2024 17:48:57 +0800 Subject: [PATCH] Fix compatibility of debugedit tool on sw_64 platform. Signed-off-by: Weisson --- ...y-of-debugedit-tool-on-sw_64-platfor.patch | 42 +++++++++++++++++++ rpm.spec | 6 ++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 rpm-4.14.3-Fix-compatibility-of-debugedit-tool-on-sw_64-platfor.patch diff --git a/rpm-4.14.3-Fix-compatibility-of-debugedit-tool-on-sw_64-platfor.patch b/rpm-4.14.3-Fix-compatibility-of-debugedit-tool-on-sw_64-platfor.patch new file mode 100644 index 0000000..16f0d82 --- /dev/null +++ b/rpm-4.14.3-Fix-compatibility-of-debugedit-tool-on-sw_64-platfor.patch @@ -0,0 +1,42 @@ +From 4c18e2a55783adc416834c86a6ed8491d8347236 Mon Sep 17 00:00:00 2001 +From: Weisson +Date: Tue, 28 May 2024 15:24:55 +0800 +Subject: [PATCH] Fix compatibility of debugedit tool on sw_64 platform. + +Signed-off-by: Weisson +--- + system.h | 4 ++++ + tools/debugedit.c | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/system.h b/system.h +index a8f3043..666ab5e 100644 +--- a/system.h ++++ b/system.h +@@ -136,4 +136,8 @@ extern int fdatasync(int fildes); + # endif + #endif + ++#ifndef R_SW_64_REFLONG ++# define R_SW_64_REFLONG 1 ++#endif ++ + #endif /* H_SYSTEM */ +diff --git a/tools/debugedit.c b/tools/debugedit.c +index 1d1c808..759ce26 100644 +--- a/tools/debugedit.c ++++ b/tools/debugedit.c +@@ -581,6 +581,10 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype) + if (rtype != R_ALPHA_REFLONG) + goto fail; + break; ++ case EM_SW_64: ++ if (rtype != R_SW_64_REFLONG) ++ goto fail; ++ break; + #if defined(EM_AARCH64) && defined(R_AARCH64_ABS32) + case EM_AARCH64: + if (rtype != R_AARCH64_ABS32) +-- +1.8.3.1 + diff --git a/rpm.spec b/rpm.spec index bbd00b2..d17e0d0 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.8 +%define anolis_release .0.9 %define _legacy_common_support 1 # build against xz? @@ -191,6 +191,7 @@ Source1000: 0001-support-sqlite-backend-rpmdb.patch Patch2002: rpm-4.14.3-sw.patch Patch2003: 2004-rpm-anolis-support-sw_64.patch Patch2004: rpm-4.14.3-keep-compatibility-between-sw-and-other-architecture.patch +Patch2005: rpm-4.14.3-Fix-compatibility-of-debugedit-tool-on-sw_64-platfor.patch # Partially GPL/LGPL dual-licensed and some bits with BSD # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD @@ -759,6 +760,9 @@ rpm -q rpm 2>&1 | grep bdb && rpmdb --rebuilddb %doc doc/librpm/html/* %changelog +* Mon May 27 2024 Weisson - 4.14.4-27.0.9 +- Fix compatibility of debugedit tool on sw_64 platform. + * Mon Apr 8 2024 Weisson - 4.14.4-27.0.8 - keep compatibility between sw and other architecture. -- Gitee