debugedit/add-loongarch-support-not-upstream-modified.patch
herengui 5d79960f7f 添加龙芯和申威架构支持
Signed-off-by: herengui <herengui@kylinsec.com.cn>
(cherry picked from commit 5b4dffb74fa53a10080bf1d7bfbf6f0358dfcbac)
2023-09-21 14:09:00 +08:00

29 lines
781 B
Diff

From 0862098a423f3324b5e8024f94e42ebcc1ec1697 Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Mon, 9 Jan 2023 18:40:28 +0800
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 216e2fa..3cf4985 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.33.0