!27 [sync] PR-25: 添加龙芯和申威架构支持
From: @openeuler-sync-bot Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
ff480be1c9
28
add-loongarch-support-not-upstream-modified.patch
Normal file
28
add-loongarch-support-not-upstream-modified.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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
|
||||||
31
add-sw_64-support-not-upstream-modified.patch
Normal file
31
add-sw_64-support-not-upstream-modified.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: debugedit
|
Name: debugedit
|
||||||
Version: 5.0
|
Version: 5.0
|
||||||
Release: 5
|
Release: 6
|
||||||
Summary: Tools for debuginfo creation
|
Summary: Tools for debuginfo creation
|
||||||
License: GPL-2.0-or-later and LGPL-2.1-only and GPL-3.0-only
|
License: GPL-2.0-or-later and LGPL-2.1-only and GPL-3.0-only
|
||||||
Group: Applications
|
Group: Applications
|
||||||
@ -20,10 +20,10 @@ Requires: sed dwz grep
|
|||||||
Patch0: tests-Handle-zero-directory-entry-in-.debug_line-DWA.patch
|
Patch0: tests-Handle-zero-directory-entry-in-.debug_line-DWA.patch
|
||||||
Patch1: find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
Patch1: find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
||||||
|
|
||||||
|
Patch1000: add-loongarch-support-not-upstream-modified.patch
|
||||||
|
Patch1001: add-sw_64-support-not-upstream-modified.patch
|
||||||
|
|
||||||
Patch6000: backport-Fix-u-option.patch
|
Patch6000: backport-Fix-u-option.patch
|
||||||
%ifarch loongarch64
|
|
||||||
Patch9000: skip-some-unsupported-tests.patch
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Debugedit provides programs and scripts for creating debuginfo and
|
Debugedit provides programs and scripts for creating debuginfo and
|
||||||
@ -67,6 +67,9 @@ make check %{?_smp_mflags}
|
|||||||
%{_rpmconfigdir}/debugedit
|
%{_rpmconfigdir}/debugedit
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 10 2023 herengui <herengui@kylinsec.com.cn> - 5.0-6
|
||||||
|
- Add support for sw_64 and loongarch64
|
||||||
|
|
||||||
* Mon Nov 14 2022 Wenlong Zhang <zhangwenlong@loongson.cn> - 5.0-5
|
* Mon Nov 14 2022 Wenlong Zhang <zhangwenlong@loongson.cn> - 5.0-5
|
||||||
- Skip some unsupported tests for loongarch
|
- Skip some unsupported tests for loongarch
|
||||||
|
|
||||||
|
|||||||
@ -1,124 +0,0 @@
|
|||||||
From b0b071c3fd34ca04f8ca9a883bf0c28cea5a7040 Mon Sep 17 00:00:00 2001
|
|
||||||
From: baizg1107 <preloyalwhite@163.com>
|
|
||||||
Date: Tue, 31 May 2022 14:56:54 +0800
|
|
||||||
Subject: [PATCH] skip some unsupported tests
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/debugedit.at | 24 ++++++++++++------------
|
|
||||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/debugedit.at b/tests/debugedit.at
|
|
||||||
index 1c59e86..e5452e1 100644
|
|
||||||
--- a/tests/debugedit.at
|
|
||||||
+++ b/tests/debugedit.at
|
|
||||||
@@ -104,7 +104,7 @@ if test $expout_lines -lt 3; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check the replaced strings are all there.
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o];exit 0])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
|
|
||||||
AT_CHECK([[
|
|
||||||
@@ -137,7 +137,7 @@ if test $expout_lines -lt 3; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check the replaced strings are all there.
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o];exit 0])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
|
|
||||||
AT_CHECK([[
|
|
||||||
@@ -171,7 +171,7 @@ if test $expout_lines -lt 3; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check the replaced strings are all there.
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o];exit 0])
|
|
||||||
AT_CHECK([[
|
|
||||||
readelf -p.debug_str ./foobarbaz.part.o | cut -c13- \
|
|
||||||
| grep ^/foo/bar/baz | sort
|
|
||||||
@@ -203,7 +203,7 @@ if test $expout_lines -lt 3; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check the replaced strings are all there.
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o];exit 0])
|
|
||||||
AT_CHECK([[
|
|
||||||
readelf -p.debug_str -p.debug_line_str ./foobarbaz.part.o | cut -c13- \
|
|
||||||
| grep ^/foo/bar/baz | sort | uniq
|
|
||||||
@@ -301,7 +301,7 @@ AT_DATA([expout],
|
|
||||||
/foo/bar/baz/subdir_bar
|
|
||||||
])
|
|
||||||
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o];exit 0])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
|
|
||||||
AT_CHECK([[
|
|
||||||
@@ -326,7 +326,7 @@ AT_DATA([expout],
|
|
||||||
/foo/bar/baz/subdir_bar
|
|
||||||
])
|
|
||||||
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o];exit 0])
|
|
||||||
AT_CHECK([[
|
|
||||||
readelf --debug-dump=info ./foobarbaz.part.o \
|
|
||||||
| grep -E 'DW_AT_(name|comp_dir)' \
|
|
||||||
@@ -380,7 +380,7 @@ stringp_baz
|
|
||||||
stz
|
|
||||||
])
|
|
||||||
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o];exit 0])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
|
|
||||||
AT_CHECK([[
|
|
||||||
@@ -413,7 +413,7 @@ stringp_foo
|
|
||||||
stz
|
|
||||||
])
|
|
||||||
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o];exit 0])
|
|
||||||
AT_CHECK([[
|
|
||||||
readelf --debug-dump=info ./foobarbaz.part.o \
|
|
||||||
| awk '/Abbrev Number:.*DW_TAG_type_unit/{p=1}{if(p)print}/^$/{p=0}' \
|
|
||||||
@@ -470,7 +470,7 @@ AT_DATA([expout],
|
|
||||||
/foo/bar/baz/subdir_headers
|
|
||||||
])
|
|
||||||
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o];exit 0])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
|
|
||||||
AT_CHECK([[
|
|
||||||
@@ -521,7 +521,7 @@ AT_DATA([expout],
|
|
||||||
/foo/bar/baz/subdir_headers
|
|
||||||
])
|
|
||||||
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o];exit 0])
|
|
||||||
AT_CHECK([[
|
|
||||||
readelf --debug-dump=line ./foobarbaz.part.o \
|
|
||||||
| grep -A3 "The Directory Table" | grep "^ [123]" \
|
|
||||||
@@ -617,7 +617,7 @@ NUMBER 42
|
|
||||||
NUMBER 42
|
|
||||||
])
|
|
||||||
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foo.o];exit 0])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
|
|
||||||
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
|
|
||||||
AT_CHECK([[
|
|
||||||
@@ -642,7 +642,7 @@ NUMBER 42
|
|
||||||
NUMBER 42
|
|
||||||
])
|
|
||||||
|
|
||||||
-AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
|
|
||||||
+AT_SKIP_IF([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o];exit 0])
|
|
||||||
AT_CHECK([[
|
|
||||||
readelf --debug-dump=macro ./foobarbaz.part.o \
|
|
||||||
| grep NUMBER | rev | cut -d: -f1 | rev | cut -c2-
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user