From nobody Tue Apr 04 18:08:30 2023 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 4PrbNZ6sswz43xZx; Tue, 4 Apr 2023 18:08:30 +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 4PrbNZ6MrDz458X; Tue, 4 Apr 2023 18:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680631710; 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=+aE7AbULkq/q4p8j5xGUUI8o1ijDzYGaGQnCzJOfjo4=; b=DEkNSsRCsXJxZOH912ee47eAZoFu84ECpaVC1mKnhsRGRSCQMQkxIxaErxLhIiJzMzWZjB K8BaxQ72wt9DehyZJz4b00USSiUnYKCjHhyGW1IpHnK0IfFu7IvtjtewY2L0/+OSuLObh/ 6wSpP3xPEJNOF2xLdl+a+tBp+4ttEWixE0uMf4q9blMmBlNYX1Pg0aAK1O8Yv7qk5rtMk1 T0FYL6/lqlht4eLtjfzW4FTlEwnOVp+0T5fDdyoDaQF37/7JbLQFP9tJrVF2CGSiQ2UY61 Gt5jEPXQ/y3GzqRQiTuAodMFZ02cDmquOkDj08hLaTf0/s1tlIdKrmFY68B3xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680631710; 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=+aE7AbULkq/q4p8j5xGUUI8o1ijDzYGaGQnCzJOfjo4=; b=coWc0ab8LwVVIEpg5Fr+HSr8BM/XvdLElC/G/EC6lJMM+gjgqrVX6q/5lNkLoNFofI0BtP WUn9Q0gY+M3XZf97wy72eAE6pIIdPO1rtn9/w0863rujSM6vH21pYPuG1YRERsyQPcbdzl ipdL6adM0BGYPxXVvss3dXe38DJLr4EbxvjAUXXUOse208T9bT7SsXMzxC4e0apORaqmgQ aIZoTNlXZKfmk+IGlGhBqDIxpB66DWPDImju/hPPQI3gBx3/jGmiSIq5QHwy0fIpzYlaE8 dh9m9HfgdofeV/+BZU5rlWLdCm4fkSuuKi6bswTSC3y/eS9fVxDju6ZeizTfrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680631710; a=rsa-sha256; cv=none; b=i+tsytdJDEZGbAAkWEf2xDJIEaKHxntLLo9h2b7KRZMiI1ZumyaKCiYgIPbQd/NYRQhhd8 +fTGGLcZczz4dW1h+Z5WEjkjI5B2Q2x3KB/dtSqqffaY9Grxmfoa6vMnGrQpSAaTjs6DqK 1+OvWGSPlBPxtT+mYdfLe56nnx4GLgb77kcsBgrKNkHfXPp+iZw8tVribvt/2VHY1+15Mu 4JvM5LB6CWf82WQG/zlnUlsG3E8p/UdAmxqkBx3JW7rSNwSkuy4wD/OlnNXm86/NZJcc1X OfrXWUWpIisJr3KI/qzg4lQQGifJ+XJWeu2l9oQDnour1CW3SuTJdxituSExew== 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 4PrbNZ5Rcvzqcw; Tue, 4 Apr 2023 18:08:30 +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 334I8URq061004; Tue, 4 Apr 2023 18:08:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 334I8UDi061003; Tue, 4 Apr 2023 18:08:30 GMT (envelope-from git) Date: Tue, 4 Apr 2023 18:08:30 GMT Message-Id: <202304041808.334I8UDi061003@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: 27f35b7dd418 - main - libdtrace: Do not set SHF_ALLOC on SUNW_dof relocation sections 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: 27f35b7dd418a82cf2f5bb618bd4bb7e81253f3a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=27f35b7dd418a82cf2f5bb618bd4bb7e81253f3a commit 27f35b7dd418a82cf2f5bb618bd4bb7e81253f3a Author: Mark Johnston AuthorDate: 2023-04-04 15:21:51 +0000 Commit: Mark Johnston CommitDate: 2023-04-04 18:08:16 +0000 libdtrace: Do not set SHF_ALLOC on SUNW_dof relocation sections The section will contain static relocations which do not need to be preserved after linking, and moreover these relocations may reference symbols that end up getting removed. Do not set SHF_ALLOC and instead let the linker decide what needs to be done. PR: 258872 MFC after: 1 week Sponsored by: The FreeBSD Foundation --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c index 51f853d9a2b8..442c6f940733 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c @@ -582,7 +582,7 @@ dump_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, int fd) } else { shp = &elf_file.shdr[ESHDR_REL]; shp->sh_name = 37; /* DTRACE_SHSTRTAB32[37] = ".rel.SUNW_dof" */ - shp->sh_flags = SHF_ALLOC; + shp->sh_flags = 0; shp->sh_type = SHT_REL; shp->sh_entsize = sizeof (de.de_rel[0]); shp->sh_link = ESHDR_SYMTAB; @@ -739,7 +739,7 @@ dump_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, int fd) } else { shp = &elf_file.shdr[ESHDR_REL]; shp->sh_name = 37; /* DTRACE_SHSTRTAB64[37] = ".rel.SUNW_dof" */ - shp->sh_flags = SHF_ALLOC; + shp->sh_flags = 0; shp->sh_type = SHT_RELA; shp->sh_entsize = sizeof (de.de_rel[0]); shp->sh_link = ESHDR_SYMTAB;