mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 10:19:04 +00:00
rtld: use generated map file to check for some leaks from libc into rtld
Reviewed by: brooks, emaste (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44136
This commit is contained in:
parent
799940154c
commit
5db5c6c87a
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue