From 22d3d0b8a13759325de050c6105c976f4ba48d40 Mon Sep 17 00:00:00 2001 From: l00580197 Date: Tue, 8 Aug 2023 21:51:53 +0800 Subject: [PATCH] revert to use pie links and change relocation position --- bash.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bash.spec b/bash.spec index 79f4ad5..34466a2 100644 --- a/bash.spec +++ b/bash.spec @@ -1,7 +1,7 @@ %global ENABLE_RELOC 1 %if %{ENABLE_RELOC} -%global ldflags_options -Wl,--emit-relocs +%global ldflags_options -Wl,--emit-relocs,-pie %endif Name: bash @@ -96,7 +96,8 @@ install -pDm 644 %SOURCE2 %{buildroot}/etc/skel/.bash_profile install -pDm 644 %SOURCE3 %{buildroot}/etc/skel/.bash_logout install -pDm 644 ./configs/alias.sh %{buildroot}%{_sysconfdir}/profile.d/alias.sh %if %{?ENABLE_RELOC} -install -pD $RPM_BUILD_DIR/%{name}-%{version}/bash.relocation %{buildroot}%{_bindir}/bash.relocation +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation%{_libdir} +install -pD $RPM_BUILD_DIR/%{name}-%{version}/bash.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation%{_libdir} %endif # bug #820192, need to add execable alternatives for regular built-ins @@ -126,7 +127,7 @@ make check %files relocation %defattr(400,root,root,-) %dir %attr(500, root, root) %{_bindir} -%attr(400, root, root) %{_bindir}/bash.relocation +%attr(400, root, root) /usr/lib/relocation%{_libdir}/bash.relocation %endif %files devel -- Gitee