From nobody Mon Feb 05 20:52:36 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 4TTJVT2Tjhz590PN for ; Mon, 5 Feb 2024 20:52:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TTJVT055Rz50Js for ; Mon, 5 Feb 2024 20:52:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-33b13332ca7so3043218f8f.2 for ; Mon, 05 Feb 2024 12:52:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707166367; x=1707771167; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VTvedsp8/7KWWMjM3Pify68Hmh4sG62Dfbuf7S20Qo4=; b=GRYpgc3lC+vKDmF1f7MQ7xKYySpjgMpc9vw5ITooTxUqcq6+fVRcfjswOugE7HvEhP lriNHD4fdvapb4s6UZpzA5OQC+WZvF1A+hgjwZ102cFzU/wLnPv6A8tsWz1vB3mb4KyX e3l1MA7ZtKIq00m6wy6H6hyiSfbp9cRXRw4wrTn0prL6RNhjFooCxDsirNMZOOF51Mox 0tMW+zkhrrIPP1jqR7Omslom6tvL34jDqyb3RhVnUGjIkxeqAoYqDS42lu9G/Ej2KuoT 3/YjjAVt6FbNjV1om8YN+kmEOhQIkHBiIkCSlST+GXYBAnhZ8yUel0HqGZ07Os0N6P+Y EioQ== X-Gm-Message-State: AOJu0YwsyxdBzxMZ+EPtIZDVBSLsQn/jbEilZ/FGxSdl3f8D8lp78cK1 sw+ITBtkugIXxTtQ7LV77qSM+wCeL8nZZBRtKagASxxAEh/vohCktrewT/AueyQ7mblW/dU/2ag F X-Google-Smtp-Source: AGHT+IEDGaXTB8EK+todKq6vK3sXTxPyVkVhptf/WKT2bHI4EknJMeJQe6vv6jJ4LwQDZqzM0ZFBgA== X-Received: by 2002:a5d:4dca:0:b0:33b:1aca:8c01 with SMTP id f10-20020a5d4dca000000b0033b1aca8c01mr460084wru.19.1707166367291; Mon, 05 Feb 2024 12:52:47 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUdY/kMgFS8j6wPjb1w5mdqQkeABndSLNdkwnj0uzelX7x1U7d9UvNyzRdijY4MQbgfLwT5rQz6IHDd9c7/GpjOjBzDrTcIXibbwxZO31xjxnaN/Uv7OWTtyt0V6yWhv5TmKw2546z+i91hxN649tlWHQ== Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id p15-20020adfe60f000000b0033aee3bfac5sm443687wrm.16.2024.02.05.12.52.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2024 12:52:46 -0800 (PST) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: 0d4f7723bc43 - main - libc: link libsys as a auxiliary filter library From: Jessica Clarke In-Reply-To: <202402052038.415KckEC069716@gitrepo.freebsd.org> Date: Mon, 5 Feb 2024 20:52:36 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <68B8B759-E01F-498A-850B-23EAE4A3DABC@freebsd.org> References: <202402052038.415KckEC069716@gitrepo.freebsd.org> To: Brooks Davis X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TTJVT055Rz50Js X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 5 Feb 2024, at 20:38, Brooks Davis wrote: >=20 > The branch main has been updated by brooks: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D0d4f7723bc43e06ca22025740cb826a7= f282ea11 >=20 > commit 0d4f7723bc43e06ca22025740cb826a7f282ea11 > Author: Brooks Davis > AuthorDate: 2023-11-15 23:35:16 +0000 > Commit: Brooks Davis > CommitDate: 2024-02-05 20:34:56 +0000 >=20 > libc: link libsys as a auxiliary filter library >=20 > 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. >=20 > 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(-) >=20 > diff --git a/Makefile.inc1 b/Makefile.inc1 > index 7a9917fd8a74..f97e53cc7f9a 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -3125,10 +3125,12 @@ _startup_libs=3D lib/csu > _startup_libs+=3D lib/libc > _startup_libs+=3D lib/libc_nonshared > _startup_libs+=3D lib/libcxxrt > +_startup_libs+=3D lib/libsys >=20 > _prereq_libs+=3D lib/libgcc_eh lib/libgcc_s > _startup_libs+=3D lib/libgcc_eh lib/libgcc_s >=20 > +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".) >=20 > +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=3D ${_libnetgraph} > SUBDIR_DEPEND_libc++:=3D 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=3D libcompiler_rt libssp_nonshared > +SUBDIR_DEPEND_libc=3D libsys libcompiler_rt libssp_nonshared > SUBDIR_DEPEND_libcam=3D libsbuf > SUBDIR_DEPEND_libcasper=3D libnv > SUBDIR_DEPEND_libdevstat=3D 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+=3D -ftls-model=3Dinitial-exec > # > LDFLAGS+=3D -nodefaultlibs > LIBADD+=3D compiler_rt > +LIBADD+=3D sys > + > +LDFLAGS+=3D-Wl,--auxiliary,libsys.so =46rom reading documentation and implementation code (LLD + rtld), = should this not be the soname, i.e. libsys.so.7? Jess > .if ${MK_SSP} !=3D "no" && \ > (${LIBC_ARCH} =3D=3D "i386" || ${LIBC_ARCH:Mpowerpc*} !=3D "") > 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=3D util > _DP_ztest=3D 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=3D compiler_rt > +_DP_c=3D 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} !=3D "no" && \