debugedit/add-sw_64-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

32 lines
842 B
Diff

From b712bb61d749ce5ab6c2af7e322f48e845ae78ba Mon Sep 17 00:00:00 2001
From: yangchenguang <yangchenguang@kylinsec.com.cn>
Date: Wed, 10 May 2023 21:00:10 +0800
Subject: [PATCH] Add sw_64 support
Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
---
tools/debugedit.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/debugedit.c b/tools/debugedit.c
index 3cf4985..0c43615 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -624,6 +624,12 @@ setup_relbuf (DSO *dso, debug_section *sec, int *reltype)
goto fail;
break;
#endif
+#if defined(EM_SW_64) && defined(R_SW_64_REFLONG)
+ case EM_SW_64:
+ if (rtype != R_SW_64_REFLONG)
+ 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