Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
ff480be1c9
!27 [sync] PR-25: 添加龙芯和申威架构支持
From: @openeuler-sync-bot 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2023-09-21 12:44:07 +00:00
herengui
5d79960f7f 添加龙芯和申威架构支持
Signed-off-by: herengui <herengui@kylinsec.com.cn>
(cherry picked from commit 5b4dffb74fa53a10080bf1d7bfbf6f0358dfcbac)
2023-09-21 14:09:00 +08:00
openeuler-ci-bot
0c26c4e16b
!19 [sync] PR-16: Skip some unsupported tests for loongarch
From: @openeuler-sync-bot 
Reviewed-by: @licunlong 
Signed-off-by: @licunlong
2022-12-20 06:41:39 +00:00
Wenlong Zhang
6ca5070f8b Skip some unsupported tests for loongarch
(cherry picked from commit 4779671b2ddeecf0546c1d83784c6a1fca2a8d2a)
2022-12-20 11:32:33 +08:00
openeuler-ci-bot
c5beec67a4
!13 make it successfully to find debugedit when running /usr/lib/rpm/find-debuginfo.sh
From: @renxichen 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
2022-11-08 09:14:22 +00:00
renxichen
b60fe25026 make it successfully to find debugedit when running /usr/lib/rpm/find-debuginfo.sh 2022-11-08 11:32:58 +08:00
openeuler-ci-bot
8471d4757d
!8 fix -u option
From: @renxichen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-10-22 08:57:20 +00:00
renxichen
bc58d83f9e fix -u option 2022-10-21 17:19:52 +08:00
openeuler-ci-bot
00021f2090
!3 bugfix on cannot generate debugsources file
Merge pull request !3 from renxichen/openEuler-22.03-LTS-Next
2022-01-08 02:43:19 +00:00
rwx403335
bfaae62379 bugfix on cannot generate debugsources file 2022-01-07 18:27:11 +08:00
openeuler-ci-bot
75ecc98231 !1 Init source
Merge pull request !1 from renxichen/openEuler-22.03-LTS-Next
2021-12-27 08:43:06 +00:00
5 changed files with 149 additions and 1 deletions

View 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

View 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

View File

@ -0,0 +1,32 @@
From dd64ac131aebbc31233d1c5f9317aaee35764374 Mon Sep 17 00:00:00 2001
From: Allan McRae <allan@archlinux.org>
Date: Sun, 2 Jan 2022 15:23:34 +1000
Subject: [PATCH] Fix -u option
The -u option was missing from optionsChars resulting in it being
unrecognised.
$ debugedit -u
debugedit: invalid option -- 'u'
Signed-off-by: Allan McRae <allan@archlinux.org>
---
tools/debugedit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/debugedit.c b/tools/debugedit.c
index a0e86d3..642b29d 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -3047,7 +3047,7 @@ static struct option optionsTable[] =
{ NULL, 0, 0, 0 }
};
-static const char *optionsChars = "b:d:l:is:nV?";
+static const char *optionsChars = "b:d:l:is:nV?u";
static const char *helpText =
"Usage: %s [OPTION...] FILE\n"
--
2.27.0

View File

@ -1,6 +1,6 @@
Name: debugedit
Version: 5.0
Release: 1
Release: 6
Summary: Tools for debuginfo creation
License: GPL-2.0-or-later and LGPL-2.1-only and GPL-3.0-only
Group: Applications
@ -18,6 +18,12 @@ Suggests: gdb-minimal
Requires: sed dwz grep
Patch0: tests-Handle-zero-directory-entry-in-.debug_line-DWA.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
%description
Debugedit provides programs and scripts for creating debuginfo and
@ -36,6 +42,10 @@ autoreconf -f -v -i
%make_install
cd %{buildroot}%{_bindir}
ln -s find-debuginfo find-debuginfo.sh
cd %{buildroot}
mkdir -p %{buildroot}%{_rpmconfigdir}
ln -s %{_bindir}/find-debuginfo %{buildroot}%{_rpmconfigdir}/find-debuginfo.sh
ln -s %{_bindir}/debugedit %{buildroot}%{_rpmconfigdir}/debugedit
%check
sed -i 's/^\(C\|LD\)FLAGS=.*/\1FLAGS=""/' tests/atlocal
@ -53,7 +63,24 @@ make check %{?_smp_mflags}
%{_mandir}/man1/debugedit.1*
%{_mandir}/man1/sepdebugcrcfix.1*
%{_mandir}/man1/find-debuginfo.1*
%{_rpmconfigdir}/find-debuginfo.sh
%{_rpmconfigdir}/debugedit
%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
- Skip some unsupported tests for loongarch
* Tue Nov 08 2022 renhongxun <renhongxun@h-partners.com> 5.0-4
- make it successfully to find debugedit when running /usr/lib/rpm/find-debuginfo.sh
* Fri Oct 21 2022 renhongxun <renhongxun@h-partners.com> 5.0-3
- fix -u option
* Fri Jan 07 2022 renhongxun <renhongxun@huawei.com> 5.0-2
- bugfix
* Sat Dec 25 2021 renhongxun <renhongxun@huawei.com>
- init package

View File

@ -0,0 +1,30 @@
From f2bc669cd0a080792522dd1bb7f50ef7025f16f0 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 21 Jul 2018 10:13:04 +0200
Subject: [PATCH] find-debuginfo.sh: decompress DWARF compressed ELF sections
debugedit and dwz do not support DWARF compressed ELF sections, let's
just decompress those before extracting debuginfo.
Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
scripts/find-debuginfo.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in
index 90a44942d..7b01bc036 100755
--- a/scripts/find-debuginfo.in
+++ b/scripts/find-debuginfo.in
@@ -357,6 +357,9 @@ do_file()
get_debugfn "$f"
[ -f "${debugfn}" ] && return
+ echo "explicitly decompress any DWARF compressed ELF sections in $f"
+ eu-elfcompress -q -p -t none "$f"
+
echo "extracting debug info from $f"
# See also cpio SOURCEFILE copy. Directories must match up.
debug_base_name="$RPM_BUILD_DIR"
--
2.18.0