Date: Thu, 7 Mar 2024 00:35:34 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: 8b84d2da9aac - stable/13 - rtld: use generated map file to check for some leaks from libc into rtld Message-ID: <202403070035.4270ZY8N055529@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8b84d2da9aac3a79be02570f2bc1ed301f03ce8e commit 8b84d2da9aac3a79be02570f2bc1ed301f03ce8e Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-02-28 23:40:41 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-03-06 07:42:42 +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 def8bb513b3b..4735ad774aa1 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -75,6 +75,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.4270ZY8N055529>