From c633f505f0c873e329d05c764b2a3b5348005f89 Mon Sep 17 00:00:00 2001 From: Tie Liu Date: Thu, 11 May 2023 21:47:08 +0800 Subject: [PATCH] Generate available relocations for sysboost --- glibc.spec | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/glibc.spec b/glibc.spec index 424ceb1..579e972 100644 --- a/glibc.spec +++ b/glibc.spec @@ -66,7 +66,7 @@ ############################################################################## Name: glibc Version: 2.34 -Release: 118 +Release: 119 Summary: The GNU libc libraries License: %{all_license} URL: http://www.gnu.org/software/glibc/ @@ -569,6 +569,17 @@ Currently, provide pthread_condition function. To keep older applications compatible, glibc-compat-2.17 provides libpthread_nonshared.a %endif +############################################################################## +# glibc reloc sub-package +############################################################################## +%package reloc +Summary: Relocations for %{name} +Requires: %{name} = %{version}-%{release} +BuildRequires: sysboost-devel + +%description reloc +This package contains relocations for %{name}. + ############################################################################## # Prepare for the build. ############################################################################## @@ -633,7 +644,7 @@ builddir=build-%{target} rm -rf $builddir mkdir $builddir pushd $builddir -../configure CC="%GCC" CXX="%GXX" CFLAGS="$BuildFlags" \ +../configure CC="%GCC" CXX="%GXX" CFLAGS="$BuildFlags" LDFLAGS="-Wl,--emit-relocs" \ --prefix=%{_prefix} \ --with-headers=%{_prefix}/include $EnableKernel \ --with-nonshared-cflags=-Wp,-D_FORTIFY_SOURCE=2 \ @@ -861,6 +872,13 @@ for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do -i $i done +pushd build-%{target} +objreloc ./libc.so +objreloc ./elf/ld.so +install -p -m 755 ./libc.so.relocation $RPM_BUILD_ROOT%{_libdir} +install -p -m 755 ./elf/ld.so.relocation $RPM_BUILD_ROOT%{_libdir} +popd + touch master.filelist touch glibc.filelist touch common.filelist @@ -1462,12 +1480,20 @@ fi %files -f compat-2.17.filelist compat-2.17 %endif +%files reloc +%{_libdir}/libc.so.relocation +%{_libdir}/ld.so.relocation + %changelog +* Mon May 8 2023 liutie - 2.34-119 +- malloc: libc.so: create reloc for sysboost +- malloc: elf/ld.so: create reloc for sysboost + * Fri Apr 28 2023 Lv Ying - 2.34-118 - malloc: elf/ld.so: Consider maybe-existing hole between PT_LOAD segments when mmap reserved area * Thu Apr 13 2023 Qingqing Li - 2.34-117 -- malloc: Fix -Wuse-after-free warning in tst-mallocalign1 [BZ #26779] +- malloc: Fix -Wuse-after-free warning in tst-malloc lign1 [BZ #26779] * Tue Apr 11 2023 zhanghao - 2.34-116 - nscd: Fix netlink cache invalidation if epoll is used [BZ #29415] -- Gitee