1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

rtld: unconditionally generate map file during build

It is needed at least to ensure that undesirable code is not linked into
rtld from libsys/libc, and adding the map file option each time is not
productive.

Reviewed by:	brooks, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D44136
This commit is contained in:
Konstantin Belousov 2024-02-28 02:04:37 +02:00
parent 7ee47c3bb7
commit 799940154c

View File

@ -73,6 +73,12 @@ SYMBOL_MAPS+= ${RTLD_ELF_DIR}/${RTLD_ARCH}/Symbol.map
.sinclude "${RTLD_ELF_DIR}/${RTLD_ARCH}/Makefile.inc"
RTLD_ENTRY?= .rtld_start
# Always produce the map file so that may be inspected to confirm
# undesired code is not linked from libsys/libc.
MAPFILE= ld-elf.so.1.map
LDFLAGS+= -Wl,-Map=${MAPFILE} -Wl,--cref
CLEANFILES+= ${MAPFILE}
# 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: