From nobody Sun Dec 11 16:39:57 2022 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 4NVVq15xBkz4jfGt; Sun, 11 Dec 2022 16:39: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 4NVVq14gLXz3JRW; Sun, 11 Dec 2022 16:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670776797; 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=c2+78nnmI4bPrcbK+f6Je+dtDvn0jwfZN40WHbHwl3Q=; b=W1mm/Z29fTk9ZsDmCqBfPn7cFK9EuoExgYQKkQDC9uyWEIVwkLcjWmEzATVEhBrWKGKe1p Gpr7XkKSWielJIsdhOAkgVbrxnmGbFFOZcTWsOlxnLHIUiupssRTJVwjN2c5Dj8G00lfyx dmMTF2MWGL1ckw2A40vanAR58WspcnIzIwVjc9UIHkNnTV9BML96SKaaeghMpeRRY4lUVo KSoNnXXkQsZww4R8rEECmuoZOzkOKeBC5Kds33aKwh8s8aREPBuJbNpaKs22FIkiWiGoUB GmgcGciMq6CKM32XPm94momqdq1J9qRidnPdoI8kcA36iUgZ3uqHGpg3bb3ygQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670776797; 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=c2+78nnmI4bPrcbK+f6Je+dtDvn0jwfZN40WHbHwl3Q=; b=Muouv5pUIBOJ9Uzsm0fds96hxYlWDvC3mJAWcCWdffe72puze+tmUd4g55WTu4QBHkBcxd chWRV0EkWlUjohED/mSId3BUsi7QOxQmI85m9kvpJQANlUcB1e7oIfzi4yFw5M8fQxLB+G UGiEatcQ41eo5Z4KwsdLhYmrgaj/B0s7qS6tVCdYSzEDbfWK9nuJ1cMsVJNNECvtuz6d4p XYFZ6NIQViuKtZKmM4VagnyMhQiGEOGV3r2Vq+5riJ7LvkNgjTSAYIrGSvzwYfrDvkJigu PryzB/p/DX7A00aZI9JLj4GsK5ag7rhQigpan3i7czXi5H9WXhED/ryCOV+Xxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670776797; a=rsa-sha256; cv=none; b=tcUn4oidhDYqT3PBBUSrmWBSPwK6qX6TjtuCWC7OKTk22mOVZxgKohLoYRaLhTjtiX5TdB lMeHqZhypkOgcC5XLSoD9rU0jjBvcvN9sbhmDWTMbyNNkMjWyY+P368NkuC8wYKbu/k2XM bntk/VabwqiDPIP8+sT81hkFI6NVhdaRrtdMY2RfDB+eZntyVk02/hTcbO+01Vkmhu3aQC Vgz+Kms+s2MtdxiL5Q0eIXYNN+5TGGEVUTmCxP8dNQ8jFiIZ1DoU67uROIyTFU9PSbkB5W OiXPvmExMm9KkxrBFnJcbucrTj1v1J7AUPU/XEbYd3ofVr13DYBrQjnYJUfpnQ== 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 4NVVq13Rmxz11rc; Sun, 11 Dec 2022 16:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BBGdvZN082021; Sun, 11 Dec 2022 16:39:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BBGdvJn082020; Sun, 11 Dec 2022 16:39:57 GMT (envelope-from git) Date: Sun, 11 Dec 2022 16:39:57 GMT Message-Id: <202212111639.2BBGdvJn082020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: be39466a1035 - main - libdtrace: Change the binding of USDT probe symbols to STB_WEAK 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be39466a1035ffb13268cd63723e976898e9b91e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=be39466a1035ffb13268cd63723e976898e9b91e commit be39466a1035ffb13268cd63723e976898e9b91e Author: Mark Johnston AuthorDate: 2022-12-11 16:27:22 +0000 Commit: Mark Johnston CommitDate: 2022-12-11 16:27:22 +0000 libdtrace: Change the binding of USDT probe symbols to STB_WEAK Otherwise, if multiple object files contain references to the same probe, newish lld will refuse to link them by default, raising a duplicate global symbol definition error. Previously, duplicate global symbols with identical absolute st_values were permitted by both lld and GNU ld. Since dtrace has no use for probe function symbols after the relocation performed by dtrace -G, make the symbols weak as well, following a suggestion from MaskRay. Reported by: dim MFC after: 1 week Sponsored by: The FreeBSD Foundation --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c index 0b3dac0224f9..927b4415409d 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c @@ -1612,6 +1612,7 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *eprobesp) * invocation. */ if (rsym.st_shndx != SHN_ABS) { + rsym.st_info = GELF_ST_INFO(STB_WEAK, STT_FUNC); rsym.st_shndx = SHN_ABS; (void) gelf_update_sym(data_sym, ndx, &rsym); }