Date: Thu, 7 Mar 2024 00:35:00 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 3cce838c60fc - stable/14 - rtld: use generated map file to check for some leaks from libc into rtld Message-ID: <202403070035.4270Z0VL055243@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3cce838c60fcda9aacf249d1172bff7f78c4bf3b commit 3cce838c60fcda9aacf249d1172bff7f78c4bf3b Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-02-28 23:40:41 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-03-07 00:34:34 +0000 rtld: use generated map file to check for some leaks from libc into rtld (cherry picked from commit 5db5c6c87a75f8b1871f021726fc4697253ae5cf) --- libexec/rtld-elf/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index cc40b839024f..37c3840538d5 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -79,6 +79,25 @@ MAPFILE= ld-elf.so.1.map LDFLAGS+= -Wl,-Map=${MAPFILE} -Wl,--cref CLEANFILES+= ${MAPFILE} +afterbuild: + @if grep __libsys_interposing ${MAPFILE} >/dev/null ; then \ + echo "libsys_interposing leaked" 1>&2 ; \ + exit 1 ; \ + fi + @if grep __libc_interposing ${MAPFILE} >/dev/null ; then \ + echo "libc_interposing leaked" 1>&2 ; \ + exit 1 ; \ + fi + @if grep xlocale ${MAPFILE} >/dev/null ; then \ + echo "xlocale leaked" 1>&2 ; \ + exit 1 ; \ + fi + @if grep fprintf ${MAPFILE} >/dev/null ; then \ + echo "stdio leaked" 1>&2 ; \ + exit 1 ; \ + fi + + # Since moving rtld-elf to /libexec, we need to create a symlink. # Fixup the existing binary that's there so we can symlink over it. beforeinstall:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403070035.4270Z0VL055243>