diff --git a/0005-add-loongarch-support-for-debugedit.patch b/0005-add-loongarch-support-for-debugedit.patch new file mode 100644 index 0000000000000000000000000000000000000000..c1a33e648e0bf6eebb58e7116db2ddca806107c0 --- /dev/null +++ b/0005-add-loongarch-support-for-debugedit.patch @@ -0,0 +1,29 @@ +From 8ab919e25b8e291e251981b7d9a98db17cea5886 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Tue, 7 Nov 2023 09:26:40 +0000 +Subject: [PATCH] add loongarch support for debugedit + +--- + tools/debugedit.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tools/debugedit.c b/tools/debugedit.c +index 668777a..911e84e 100644 +--- a/tools/debugedit.c ++++ b/tools/debugedit.c +@@ -618,6 +618,12 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype) + goto fail; + break; + #endif ++#if defined(EM_LOONGARCH) ++ case EM_LOONGARCH: ++ if (rtype != R_LARCH_32) ++ goto fail; ++ break; ++#endif + #if defined(EM_MCST_ELBRUS) && defined(R_E2K_32_ABS) + case EM_MCST_ELBRUS: + if (rtype != R_E2K_32_ABS) +-- +2.41.0 + diff --git a/debugedit.spec b/debugedit.spec index d18402473150d868dc512290db0484bb6e74bfa6..8397234b4ae88ded19a4083b5d98ea6c15233bd4 100644 --- a/debugedit.spec +++ b/debugedit.spec @@ -1,4 +1,4 @@ -%define anolis_release 5 +%define anolis_release 6 %global _hardened_build 1 Summary: Tools for debuginfo creation @@ -16,6 +16,7 @@ Patch0003: 0001-find-debuginfo-Pass-j-down-to-dwz.patch Patch0004: 0002-configure.ac-Use-AC_LINK_IFELSE-for-gz-none-check.patch Patch0005: 0003-configure.ac-Use-AC_LANG_PROGRAM-for-AC_LINK_IFELSE-.patch Patch0006: 0004-scripts-find-debuginfo.in-Add-q-quiet.patch +Patch0007: 0005-add-loongarch-support-for-debugedit.patch BuildRequires: make, gcc > 12.0, help2man, dwz, autoconf, automake BuildRequires: pkgconfig(libelf), pkgconfig(libdw) @@ -78,6 +79,9 @@ ln -s find-debuginfo find-debuginfo.sh %doc README %changelog +* Tue Nov 7 2023 Wenlong Zhang - 5.0-6 +- add loongarch64 support for debugedit + * Tue Apr 11 2023 Ziyang Zhang -5.0-5 - Optimize spec file