From nobody Thu Feb 29 01:54:46 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 4TlZ6H0rZvz5BZx5; Thu, 29 Feb 2024 01:54: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 4TlZ6H0LCKz46j8; Thu, 29 Feb 2024 01:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709171687; 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=0eb1pJylzlE79pLZrQM+MFHpUIvvH68J1H6E6B2t4vw=; b=nIdHgStmrgsYY4a1Kp2tRNwehZECeKQA9Tx77w6UvbE34ZM8VMjxkzm93O7xBZPpI7HXjI fBEiNul5mxoXqw/gyc4yOsCvKJf/vPFNY6JNooT4ygGxKPTuXTI/OZeBGgRRbrt2BuUBNS /oZpWeSqCyZUNYt02mRwxXPnN+PLd/U2JmyUcYHZZncnHhpJJU0cCtSKML247n4U2W6/xk joP1r9UBEfR8bOYLTLgAQ3a3l+E5tWQNeZjk+Dtc0FhJ4Xhan+8G8xZFZZaUvWRK0YTar5 2E1X+9/T6Y9ANdXo+gReupIcHjNdGnTORJ4r0gTvOgzf27I3ZRJGkkgymM4RTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709171687; a=rsa-sha256; cv=none; b=ny/B1iCoSCUnpKHeaBmH6eCorPURZHhejWb2MEZJ760MPauoU5I4a9vmheYz8Hqn5JouXc 7Ma+knOyIa10UBKTRLYrHc6A0GjcLsz+mMJN0dmRdx/hqF2rdqrSd6wLAiPz0QmpNraN1q 6bzlxqjQPKQFtm+K82jp97clzv1sjciIUCPoDQ5H1tdPgMFON5dRpLA0epb0mkatmLRJw0 NWAlfePABchotOgyD3aqFRVtH2es8wwcX3p7aseQp7ZqgW4FMCXTLA5s+nTPvKMNs2PTQ9 OZ01I26PK7tA7rtT4Rr8tL9Y0qgi1WhYS1DLyktrMcguXJj3zIrdRpKvKjnW1w== 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=1709171687; 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=0eb1pJylzlE79pLZrQM+MFHpUIvvH68J1H6E6B2t4vw=; b=Zp4sy671GRBtmaPFcsWa3gPyQAnIWDXzjx0vOQemQIvl/ErbBqpftdyftS850zXqglinmI sNYZIXYXK3XNIlY/p/1lKWbI2kEWIIIBSa02r9g2rUm9Quz2+icoRyP2IczLcty1FmLC0C OeLRfPdfQqdDteZgzvhoEAn+eIPGSh8oUavNdHjz+nfQD7uOkkGtz9roCpQeu+/qDavK6h AawGPBJ5FdWngWZhUQ0nQtVbpIgs7XKXRv4jwnac/NSFtascZW92vPiVALGgwQ4qxmsbAp R81JrJIxrRn6m6VPsIfHIcjw6+5ryZHoRhlOC7Mnlcw0za2+alaZP3/U59MSQw== 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 4TlZ6G73whzM6B; Thu, 29 Feb 2024 01:54: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 41T1sk9r047951; Thu, 29 Feb 2024 01:54:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41T1skB5047948; Thu, 29 Feb 2024 01:54:46 GMT (envelope-from git) Date: Thu, 29 Feb 2024 01:54:46 GMT Message-Id: <202402290154.41T1skB5047948@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: 799940154c70 - main - rtld: unconditionally generate map file during build 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: 799940154c70597a46627deb4d0b98e174b27b98 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=799940154c70597a46627deb4d0b98e174b27b98 commit 799940154c70597a46627deb4d0b98e174b27b98 Author: Konstantin Belousov AuthorDate: 2024-02-28 00:04:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-29 00:26:51 +0000 rtld: unconditionally generate map file during build It is needed at least to ensure that undesirable code is not linked into rtld from libsys/libc, and adding the map file option each time is not productive. Reviewed by: brooks, emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44136 --- libexec/rtld-elf/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index fe7e39a6b788..cc40b839024f 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -73,6 +73,12 @@ SYMBOL_MAPS+= ${RTLD_ELF_DIR}/${RTLD_ARCH}/Symbol.map .sinclude "${RTLD_ELF_DIR}/${RTLD_ARCH}/Makefile.inc" RTLD_ENTRY?= .rtld_start +# Always produce the map file so that may be inspected to confirm +# undesired code is not linked from libsys/libc. +MAPFILE= ld-elf.so.1.map +LDFLAGS+= -Wl,-Map=${MAPFILE} -Wl,--cref +CLEANFILES+= ${MAPFILE} + # Since moving rtld-elf to /libexec, we need to create a symlink. # Fixup the existing binary that's there so we can symlink over it. beforeinstall: