From nobody Mon Feb 05 20:38:46 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 4TTJBH1yjHz58y2f; Mon, 5 Feb 2024 20:38:47 +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 4TTJBG68l3z4qLL; Mon, 5 Feb 2024 20:38:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165526; 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=ba5N3t+IejEpgwxuixQwp1pGSEt3zWKlInuAbFzMfc4=; b=gm9SsAEylMHvL8sRza7u3GifBicmXcuCQLyLi1P/xNLX/bmZOIrxuU5uhi1yoM3VP5x0Wq UsaezCvS+b7R2I0Ne1iQNHljgHTpWh25GOJyIWP9g6Q+R27m5SLM+nTHhTTFbXMwzCB3mf I1kE6DMSpzVtduMDqRLRoSaY9HY38t77BNLgeAKlRveyMeP0hro/uDjMiByoaiILPWkBCN zBX306BUUdUZ1Y+IiTETCKmU/GWUTviGnH3pWNrxeZ8Y5gvIuuN0z/xldFpYHdaewJ2UBt rLOvvB5lgpPL8ewdsEqDdRZheBJG+hn7TIAtj/2lL8PXMZq46asWP4kqbhRMYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707165526; 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=ba5N3t+IejEpgwxuixQwp1pGSEt3zWKlInuAbFzMfc4=; b=jgyfjvf0DBs1FIJqvgD8WjqfHRx5lD9223d9go9wS4J4Uv6uBtg/ZMnCbhji2dqBvFJi1W QgOJkriRpeziYmytlLtrYOHwb1AZj+7lcaOuqR5j2RlgMVdQS3mXZSKeX8lRDYqgqEuqHX qsfRr4IoZCWC9zmFz9jcmeK2dlx7TgTGuGdOimto35PLmpwljx3onSnxsjNiYmhSJa/mNh sjSQLI8NKvDvnDOFk22LvPO7YSvqEbenBc4aOkEW159BqhD3I94fqNlF6Yzcf9VuSbX90w lQ/ssWUx9Cc2AQQGayvQTsh25dulkgikPlvtHQiUK5OGUa6E9Pt4PUBZdtb5KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707165526; a=rsa-sha256; cv=none; b=L18wMLiM6QNFXSOwn3nQKwdZVmOQZmu18U+8tQvzempJ6CtXrSTNPUpMYSRgBJyHnM1QOM wiE//9PfqxcaslmOkJKPl8khcp5PYEZ9GHs1lY/eodaLyh7aePDJ4I26R+Y/S9azAg5mF2 PjImGFtCI2oF/O8OGmY6vPyjhTl/856nnEca/nToTOkvBsD6bJcNm+OtYr6rOxZR1ror4T b9loImqeBo7w8t9nctG/alYHi4X9IT2+Bw3RX23mFUMCiIHrmOLrN3FVMvDjoGoaN09jZ/ ZitSj8+WQBnsGvxtAmeF6MY+JKZZMvOrBAIPYrKI2XRjbt0SRhhn0axMfJ0sSw== 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 4TTJBG5F3yzvXZ; Mon, 5 Feb 2024 20:38:46 +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 415Kckb5069719; Mon, 5 Feb 2024 20:38:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 415KckEC069716; Mon, 5 Feb 2024 20:38:46 GMT (envelope-from git) Date: Mon, 5 Feb 2024 20:38:46 GMT Message-Id: <202402052038.415KckEC069716@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: 0d4f7723bc43 - main - libc: link libsys as a auxiliary filter library 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: 0d4f7723bc43e06ca22025740cb826a7f282ea11 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0d4f7723bc43e06ca22025740cb826a7f282ea11 commit 0d4f7723bc43e06ca22025740cb826a7f282ea11 Author: Brooks Davis AuthorDate: 2023-11-15 23:35:16 +0000 Commit: Brooks Davis CommitDate: 2024-02-05 20:34:56 +0000 libc: link libsys as a auxiliary filter library At runtime, when rtld loads libc it will also load libsys. For each symbol that is present in both, the libsys one will override the libc one. It continues to be the case that program need only link against libc (usually implicitly). The linkage to libsys is automatic. Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908 --- Makefile.inc1 | 2 ++ UPDATING | 6 ++++++ lib/Makefile | 2 +- lib/libc/Makefile | 3 +++ share/mk/src.libnames.mk | 2 +- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 7a9917fd8a74..f97e53cc7f9a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3125,10 +3125,12 @@ _startup_libs= lib/csu _startup_libs+= lib/libc _startup_libs+= lib/libc_nonshared _startup_libs+= lib/libcxxrt +_startup_libs+= lib/libsys _prereq_libs+= lib/libgcc_eh lib/libgcc_s _startup_libs+= lib/libgcc_eh lib/libgcc_s +lib/libc__L: lib/libsys__L lib/libgcc_s__L: lib/libc__L lib/libgcc_s__L: lib/libc_nonshared__L lib/libcxxrt__L: lib/libgcc_s__L diff --git a/UPDATING b/UPDATING index 33bae2a42b9d..aae30936a8b5 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20240205: + For dynamically linked programs, system calls are now made from + libsys rather than libc. No change in linkage is required as + libsys is an auxiliary filter for libc. People building custom + images must ensure that libsys.so.7 is included. + 20240202: Loader now also read configuration files listed in local_loader_conf_files. Files listed here are the last ones read. And /boot/loader.conf.local was diff --git a/lib/Makefile b/lib/Makefile index db07883e2b10..9d2531820c8b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -123,7 +123,7 @@ SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} SUBDIR_DEPEND_libc++:= libcxxrt # libssp_nonshared doesn't need to be linked into libc on every arch, but it is # small enough to build that this bit of serialization is likely insignificant. -SUBDIR_DEPEND_libc= libcompiler_rt libssp_nonshared +SUBDIR_DEPEND_libc= libsys libcompiler_rt libssp_nonshared SUBDIR_DEPEND_libcam= libsbuf SUBDIR_DEPEND_libcasper= libnv SUBDIR_DEPEND_libdevstat= libkvm diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 72300e88d3d7..6a54f7641087 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -62,6 +62,9 @@ CFLAGS+= -ftls-model=initial-exec # LDFLAGS+= -nodefaultlibs LIBADD+= compiler_rt +LIBADD+= sys + +LDFLAGS+=-Wl,--auxiliary,libsys.so .if ${MK_SSP} != "no" && \ (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 5a6932614b29..3c19a4c45da3 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -393,7 +393,7 @@ _DP_xo= util _DP_ztest= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs uutil icp # The libc dependencies are not strictly needed but are defined to make the # assert happy. -_DP_c= compiler_rt +_DP_c= sys compiler_rt # Use libssp_nonshared only on i386 and power*. Other archs emit direct calls # to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. .if ${MK_SSP} != "no" && \