Compare commits

..

No commits in common. "c8b547856e44e12827d037f5790a3352fc38e008" and "0be6f94c9a2df179d50cc47033e8ec1e07e5e0e4" have entirely different histories.

3 changed files with 7 additions and 50 deletions

View File

@ -1,31 +0,0 @@
--- chrpath-0.18.orig/killrpath.c
+++ chrpath-0.18/killrpath.c
@@ -78,10 +78,26 @@
dynpos = 0;
for (i = 0; DYNSS(i, d_tag) != DT_NULL; i++)
{
- if (is_e32())
+ if (is_e32()) {
((Elf32_Dyn *)dyns)[dynpos] = ((Elf32_Dyn *)dyns)[i];
- else
+#ifdef DT_MIPS_RLD_MAP_REL
+ /* DT_MIPS_RLD_MAP_REL is relative to the offset of the tag.
+ Adjust it consequently. */
+ if (DYNSS(i, d_tag) == DT_MIPS_RLD_MAP_REL)
+ ((Elf32_Dyn *)dyns)[dynpos].d_un.d_val =
+ DO_SWAPU32(DYNSU(i, d_un.d_val) +
+ (i - dynpos) * sizeof(Elf32_Dyn));
+#endif
+ } else {
((Elf64_Dyn *)dyns)[dynpos] = ((Elf64_Dyn *)dyns)[i];
+#ifdef DT_MIPS_RLD_MAP_REL
+ /* Ditto */
+ if (DYNSS(i, d_tag) == DT_MIPS_RLD_MAP_REL)
+ ((Elf64_Dyn *)dyns)[dynpos].d_un.d_val =
+ DO_SWAPU64(DYNSU(i, d_un.d_val) +
+ (i - dynpos) * sizeof(Elf64_Dyn));
+#endif
+ }
if ( ! elf_dynpath_tag(DYNSS(i, d_tag)) )
dynpos++;
}

View File

@ -1,12 +1,10 @@
Name: chrpath
Version: 0.16
Release: 14
Release: 11
Summary: Modify the dynamic library load path (rpath) of compiled programs
License: GPL+
URL: https://github.com/openEuler-BaseService/chrpath
Source0: https://alioth-archive.debian.org/releases/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820335
Patch0: chrpath-fix-mips-segfault.patch
URL: https://chrpath.alioth.debian.org/
Source0: https://alioth.debian.org/frs/download.php/file/3979/%{name}-%{version}.tar.gz
BuildRequires: gcc
@ -41,15 +39,6 @@ make check
%{_mandir}/man1/chrpath.1*
%changelog
* Mon Nov 04 2024 Funda Wang <fundawang@yeah.net> - 0.16-14
- Handle DT_MIPS_RLD_MAP_REL on MIPS (debian bug#820335)
* Tue Oct 25 2022 yanglongkang <yanglongkang@h-partners.com> - 0.16-13
- rebuild for next release
* Thu Dec 10 2020 wangchen <wangchen137@huawei.com> - 0.16-12
- Correct URL and Source0
* Mon Feb 17 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.16-11
- Enable test cases

View File

@ -1,5 +1,4 @@
version_control: github
src_repo: openEuler-BaseService/chrpath
tag_prefix: ""
separator: "."
git_url: https://github.com/openEuler-BaseService/chrpath.git
version_control: git
src_repo: https://salsa.debian.org/themusicgod1-guest/chrpath.git
tag_prefix:
seperator: