mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04: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
1 changed files with 19 additions and 0 deletions
|
|
@ -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