From nobody Fri Feb 23 17:57:57 2024 X-Original-To: dev-commits-src-main@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 4ThHmP4Nk0z5BCMj; Fri, 23 Feb 2024 17:57:57 +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 4ThHmP2gl0z4pMD; Fri, 23 Feb 2024 17:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708711077; 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=bnNRv6++mGGHG97VbepaU+oml8dGMsA7OoW80JmI1FM=; b=SRV05U3UVjBIXZbamroKxjPm0jP+h/mZ4MWteAvsCIgneRj33Xcli5fjQYR5z2QFDuP2Cc vWnjHKShA19t1tkaK6PldIIzaDWUzJZpdKzQJdMn6oBcdhiGUgiC+UMAiNPPt9hqMWAyKH FTsSZUQLi4erk0bw4PyrMDrBB5uOAo0mJb74KWRSCwsZeGWYqIdJDWBVaZAd64yBZpcvCZ xRmUoPjI5LYPwVj5hZz4RBowMtvm7X0qiDzzh2BTYzt0qgDWHaPT3Aw/z6/1NiDRNQ1Jkv 1GvhA0T9lTOdWjkeo4RHcHsEDsA65RnwABlGBBs/LM51ojgrYfs4Jly3AOCMWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708711077; a=rsa-sha256; cv=none; b=KcaPawaH91DbvVfAC3AYMPr+6Q2z8uTKv7v7/Xkggs/LodIUO63Lslq5+SrEgHaO0w4JJV YbQgdYvEiyMFC6fouN8nNphFD5js+eU348kflg7Awuv41J1djEtuhG9/deUEBm11cVt14u xtjheKW+taqm4h57BDxNsxs7KRVHPi1qDPWdbo/DRG7rDy5nomB6esZU65/Ia2hnxkgyiI ENTB5+rRSU5Li2jZs+CLIE1VZc+vhhTv7OPrZoyljnBoyH/AlFN8QqBKffQL45EWqZDlnL 7rutGS6WPIzgel6OgpOtnE4aCRL2oYcgilXJT5AiQoXE01lnEs0b5NBVrKzvaw== 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=1708711077; 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=bnNRv6++mGGHG97VbepaU+oml8dGMsA7OoW80JmI1FM=; b=sTADLkA2p3bBR/t4i6JktrjHsU/kzIKRliJK0u/0n5S56pI2xI4yqB2jy+jajkbGFhQjFS +GJ3HBsL/Sl/07uljbHwEShJcizQdJj7ct0p9wK1MW0XE70OVO5aDsxCY9lSFrMkKoHn3D R0P6gBt7NcbtlQKPfnB+54Kl/rnSWOCQ8BBaJPnwuHV/IO4lBtnDutHOo/2VCjP0AQD24R VUzk4Opm8Voh3zwCeBc8VzpEWjqzAti2RAeoVPJNpsgIoFg56S0KLa3yLfHsMTW07nzZVT JpWJXsCM8KaFQNwZNuBo95puomCDOG2zalg0dFqj3qp5TBJQ8ZzDl1GZNLZc9g== 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 4ThHmP1nNXzQgb; Fri, 23 Feb 2024 17:57:57 +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 41NHvvWd018216; Fri, 23 Feb 2024 17:57:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41NHvvVs018213; Fri, 23 Feb 2024 17:57:57 GMT (envelope-from git) Date: Fri, 23 Feb 2024 17:57:57 GMT Message-Id: <202402231757.41NHvvVs018213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: baa7d0741b9a - main - libsys: link symbolic List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: baa7d0741b9a2117410d558c6715906980723eed Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=baa7d0741b9a2117410d558c6715906980723eed commit baa7d0741b9a2117410d558c6715906980723eed Author: Konstantin Belousov AuthorDate: 2024-02-22 21:13:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-23 17:39:42 +0000 libsys: link symbolic so that libc/libthr do not preempt libsys symbols, esp. errno-related. The issue is, if libsys is linked with DT_BIND_NOW flag, and then loaded as filter, rtld tries to relocate its PLT symbols immediately, not as filter. There, during symbol lookup, rtld finds filtering symbols in libc, and since libc is in loading filters mode, the resolution stops there. The end result is that libsys links to libc. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D44027 --- lib/libsys/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile index 5e8c39deb463..aefa19f35193 100644 --- a/lib/libsys/Makefile +++ b/lib/libsys/Makefile @@ -43,6 +43,7 @@ CFLAGS+= -ftls-model=initial-exec # Link with static libcompiler_rt.a. # LDFLAGS+= -nodefaultlibs +LDFLAGS+= -Wl,-Bsymbolic LIBADD+= compiler_rt .if ${MK_SSP} != "no" && \