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
(cherry picked from commit 5db5c6c87a
)
This commit is contained in:
parent
fd5a82ecd2
commit
8b84d2da9a
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue