add loongarch64 support for debugedit
This commit is contained in:
parent
3a2d0f74c7
commit
feba2dcb5b
29
add-loongarch-support-for-debugedit.patch
Normal file
29
add-loongarch-support-for-debugedit.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
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 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.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
|
||||||
@ -22,7 +22,7 @@ Patch1: find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
|||||||
|
|
||||||
Patch6000: backport-Fix-u-option.patch
|
Patch6000: backport-Fix-u-option.patch
|
||||||
%ifarch loongarch64
|
%ifarch loongarch64
|
||||||
Patch9000: skip-some-unsupported-tests.patch
|
Patch9000: add-loongarch-support-for-debugedit.patch
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -67,6 +67,9 @@ make check %{?_smp_mflags}
|
|||||||
%{_rpmconfigdir}/debugedit
|
%{_rpmconfigdir}/debugedit
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 6 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 5.0-6
|
||||||
|
- add loongarch64 support for debugedit
|
||||||
|
|
||||||
* 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