Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102060992
D44108.id135087.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D44108.id135087.diff
View Options
diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -1,5 +1,20 @@
-
-# sys sources
+# Implement symbols common to libc and libsys.
+#
+# When dynamically linked, the libc symbols are filtered by the actual
+# implementations in libsys. When statically linked, both libc and
+# libsys contain full implementations to preserve the API of libc.a.
+#
+# The following variable are programmer-defined:
+#
+# MDASM Override the default syscall implementation in MIASM
+# (from syscall.mk below). Each entry is a source file
+# name (e.g., vfork.S).
+# Generally defined in <arch>/Makefile.sys.
+# PSEUDO Generate _<sys> and __sys_<sys> symbols, but not <sys>.
+# Each entry is a bare syscall name (e.g., "clock_gettime").
+# INTERPOSED Like PSEUDO, but <sys>.c is added to SRCS.
+# Used for syscalls intercepted by the threading library.
+#
.PATH: ${LIBSYS_SRCTOP}/${LIBC_ARCH} ${LIBSYS_SRCTOP}
# Include the generated makefile containing the *complete* list
@@ -7,10 +22,6 @@
.include "${SRCTOP}/sys/sys/syscall.mk"
# Include machine dependent definitions.
-#
-# MDASM names override the default syscall names in MIASM.
-# PSEUDO generates _<sys>() and __sys_<sys>() symbols, but not <sys>().
-#
.include "${LIBSYS_SRCTOP}/${LIBC_ARCH}/Makefile.sys"
.if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64"
.include "${LIBSYS_SRCTOP}/x86/Makefile.sys"
@@ -50,11 +61,11 @@
.endif
PSEUDO= \
- _clock_gettime.o \
- _exit.o \
- _getlogin.o \
- _gettimeofday.o \
- _sched_getcpu.o
+ clock_gettime \
+ exit \
+ getlogin \
+ gettimeofday \
+ sched_getcpu
INTERPOSED = \
accept \
@@ -98,7 +109,7 @@
writev
SRCS+= ${INTERPOSED:S/$/.c/}
-PSEUDO+= ${INTERPOSED:C/^.*$/_&.o/}
+PSEUDO+= ${INTERPOSED}
# Add machine dependent asm sources:
SRCS+=${MDASM}
@@ -108,14 +119,14 @@
# without a trival <sys> symbol (PSEUDO). Add each syscall that satisfies
# these conditions to the ASM list.
.for _asm in ${MIASM}
-.if !${MDASM:R:M${_asm:R}} && !${PSEUDO:R:M_${_asm:R}}
+.if !${MDASM:R:M${_asm:R}} && !${PSEUDO:M${_asm:R}}
ASM+=$(_asm)
.endif
.endfor
SASM= ${ASM:S/.o/.S/}
-SPSEUDO= ${PSEUDO:S/.o/.S/}
+SPSEUDO= ${PSEUDO:C/^.*$/_&.S/}
SRCS+= ${SASM} ${SPSEUDO}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 3:25 AM (8 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14526590
Default Alt Text
D44108.id135087.diff (2 KB)
Attached To
Mode
D44108: libsys: make PSEUDO take a bare syscall name
Attached
Detach File
Event Timeline
Log In to Comment