From nobody Thu Feb 29 19:19:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tm1HY6wKqz5ClRY; Thu, 29 Feb 2024 19:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tm1HY4H1pz4X1R; Thu, 29 Feb 2024 19:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709234361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OTiBBID4h+nt2xwotVY5w5XBqccftP/7xzF0f4kIaY=; b=y1MD2GIuz2XQ6TJ684829IbmISddKJfR/zXn6YdxYfXVW67s3hTg1HhbX+7rxp/9LUowup hIxM1eTXXdD9ISNX1bO1lUJwnRyerKD07gkk+Vr1ZWcx9tQ75NlMCn0dLlvgI6WMNYnFW9 qkmxdH5IaVB2gdfXlCTPyTrxPqu+ewWQSC0Ix20MBk0c5SnYRxAhmY2Iy3pkj6klpAiBN7 4X4CllwXStRNxzFgzowfKQrHWRImmdk/wslr/CX4PE080UgGTKQY4n6YW1ZziV779SRLoV sEDHfjCiXP+iop/azQviMEAOgHeE4D75ecBLpOzWaSijnhq0bD7nRvXVtizvLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709234361; a=rsa-sha256; cv=none; b=mH82Tz+RKKrjl4PU7jw144CbXdgbhxDMkJdJp3wA0XImZjQ2M3ngwH3bc1uvTlhIXA3XRs 4vbG938O+QTSi7HdBZHNa3QFQaEabHncnDctFHnQs5jPYIDF0ZxFDK3QtNhyY3UbVrXAJg F4J0C5Fqh62DFsokDrYPoo/nTb7TnqahsQKhYP88pnLr2zNTY6G8Hz0xxWasvid7xDpbs/ cLpkebKu63zFDwCHMXiQfVyLYMuU70Q8iw7k2/O3bkyuL4naoCL24zTcqjPvr4jzcHWi5l HDR76Ub/8fTpw0Y27SiMVZGLKzlMd7CEGhcgrIUG8yJT2LVYYCz+wbinmDua9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709234361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OTiBBID4h+nt2xwotVY5w5XBqccftP/7xzF0f4kIaY=; b=oEGgy1XVkqNkd3ku5/UaQmClLvOFzhMXoXOl6UyZglX60ZHEZa62jyYWZIHz2sSEE03AM4 p+F9k3rzgoVmgMvRiBnjKSL0fPYnKjUxWw6lp3HLpow0RMSigLqtnw4IJ84gqBW7kWwb7N PB6cmjl8Nlp/AOtyroEOC8qNzJ5daJy8Sabf1ns4LHVJ5iL6RgczCF6IcFZnS75q1t4dOg wxo2+Q4wpwQaxXlaq0xNhGaAbf1EjTXrkjrCcLQXwybz35I53NtQ6fNsdx1WYXe12klXnt uE/qaoZkTukwji+MPAyUmb9mGB3H1oYr+lXCnW0RcCdgNoaP5+VylkLEZkGRxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tm1HY3tXtzv16; Thu, 29 Feb 2024 19:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41TJJLGB013145; Thu, 29 Feb 2024 19:19:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TJJLdN013142; Thu, 29 Feb 2024 19:19:21 GMT (envelope-from git) Date: Thu, 29 Feb 2024 19:19:21 GMT Message-Id: <202402291919.41TJJLdN013142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6d3f4dcda2fb - main - libsys: make PSEUDO take a bare syscall name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d3f4dcda2fb6d05dd5a25956b8c7cf012e0265f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6d3f4dcda2fb6d05dd5a25956b8c7cf012e0265f commit 6d3f4dcda2fb6d05dd5a25956b8c7cf012e0265f Author: Brooks Davis AuthorDate: 2024-02-29 19:19:01 +0000 Commit: Brooks Davis CommitDate: 2024-02-29 19:19:01 +0000 libsys: make PSEUDO take a bare syscall name Rather than having PSEUDO be a list of object files when all consumers want syscall names or source files, make it a list of bare syscall names like INTERPOSED (which is built on PSEUDO). Improve document of variables developers can set. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44108 --- lib/libsys/Makefile.sys | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 8af379be92e2..706adc974feb 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -1,5 +1,22 @@ - -# 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 /Makefile.sys. +# NOASM Don't generate system call stubs. Each entry is an +# object file name (e.g., yeild.o). Don't add more of these. +# PSEUDO Generate _ and __sys_ symbols, but not . +# Each entry is a bare syscall name (e.g., "clock_gettime"). +# INTERPOSED Like PSEUDO, but .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,11 +24,6 @@ .include "${SRCTOP}/sys/sys/syscall.mk" # Include machine dependent definitions. -# -# MDASM names override the default syscall names in MIASM. -# NOASM will prevent the default syscall code from being generated. -# PSEUDO generates _() and __sys_() symbols, but not (). -# .include "${LIBSYS_SRCTOP}/${LIBC_ARCH}/Makefile.sys" .if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" .include "${LIBSYS_SRCTOP}/x86/Makefile.sys" @@ -53,11 +65,11 @@ STATICOBJS+= auxv.o NOASM= yield.o PSEUDO= \ - _clock_gettime.o \ - _exit.o \ - _getlogin.o \ - _gettimeofday.o \ - _sched_getcpu.o + clock_gettime \ + exit \ + getlogin \ + gettimeofday \ + sched_getcpu INTERPOSED = \ accept \ @@ -101,7 +113,7 @@ INTERPOSED = \ writev SRCS+= ${INTERPOSED:S/$/.c/} -PSEUDO+= ${INTERPOSED:C/^.*$/_&.o/} +PSEUDO+= ${INTERPOSED} # Add machine dependent asm sources: SRCS+=${MDASM} @@ -111,14 +123,14 @@ SRCS+=${MDASM} # without a trival symbol (PSEUDO). Add each syscall that satisfies # these conditions to the ASM list. .for _asm in ${MIASM} -.if !${MDASM:R:M${_asm:R}} && !${NOASM:R:M${_asm:R}} && !${PSEUDO:R:M_${_asm:R}} +.if !${MDASM:R:M${_asm:R}} && !${NOASM: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}