Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151643678
D44136.id135194.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44136.id135194.diff
View Options
diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile
--- a/libexec/rtld-elf/Makefile
+++ b/libexec/rtld-elf/Makefile
@@ -73,6 +73,31 @@
.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}
+
+afterbuild:
+ @if grep __libsys_interposing ${MAPFILE} >/dev/null ; then \
+ echo "libsys_interposing leaked" ; \
+ exit 1 ; \
+ fi
+ @if grep __libc_interposing ${MAPFILE} >/dev/null ; then \
+ echo "libc_interposing leaked" ; \
+ exit 1 ; \
+ fi
+ @if grep xlocale ${MAPFILE} >/dev/null ; then \
+ echo "xlocale leaked" ; \
+ exit 1 ; \
+ fi
+ @if grep fprintf ${MAPFILE} >/dev/null ; then \
+ echo "stdio leaked" ; \
+ 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:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 5:54 PM (7 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31237400
Default Alt Text
D44136.id135194.diff (1 KB)
Attached To
Mode
D44136: rtld: unconditionally generate map file during build
Attached
Detach File
Event Timeline
Log In to Comment