From nobody Fri Dec 13 00:18:57 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 4Y8VLn3mDVz5gwYp; Fri, 13 Dec 2024 00:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y8VLn3CwBz4cSG; Fri, 13 Dec 2024 00:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734049137; 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=ojggn5Y+8bMog03jKvGQcP/q+She2pWRrDXddFphvFw=; b=NHpzzsC+sXjvqpcC76AwUj1kHxYEHdwfdRYUDkGn2Zp+vS51lfZVacDL1qJ1Px618Hc4Zv aF5c6wTyGxjH4Yhh1vUG1YPn/Bfz49UhjJk8MkrDQXkTjGNnFxXuoMd1pxIY2rvnRRARvN NXOY6oUNKAwyDpWodol9dNc1RVVWEQi3gqMDdPptTIRhzY7hl8ceEPxXB6MoeJ3N3nDlyG p1UqFWYFyZBuXsnv74zFeXKkBT+sutrc5byl2UR45gDgFK2xlPOKcu6u4P8y0VlmES0gNe 7HCMPmZmf/UP4GPy8flkwQkp7sv3zribMvgrFvr4ZVlpyeXHZIRR3Ic6iOdIRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734049137; 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=ojggn5Y+8bMog03jKvGQcP/q+She2pWRrDXddFphvFw=; b=Yu2r/SbWQeoEISbESk5FrW11Z8SfWTGFtzVxxV/+Ygu/KHyA0vxt0KXSsolWosy6EDhnSn YB8v4hTOsXiOIxB89rhtD6q4FfpATow+fSeBC6A/hpSAlR5crmTRoSd3Lafm1rV0N45zj2 erMShIvOsrITmFk0vXqp6KS4EDlmeB9jWuxN2+Haxaj71etICjLIQKBD/pYvuaoTt7lZWu xuUfWNJxVdSKFMSFuV+vDSMSjguUT3vhJzdAyTgSpxv5DkDsNZlinJKTPWE8AuYhlIqCbe UN7QQpKctzCkfp612xeGVpUqU1lnOWAy2HVfhUnGue5xCWAhl3xsI45Nb/ezYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734049137; a=rsa-sha256; cv=none; b=NHG/UAifnPbC6ocBPjdelXsmkmagIxTdMZk+snM2jWHRnK4gcxbdsC0Yaw+WVBXLEF2VpS 32h9cq8HxA2gUcz1/Psat8rk/KBP5yunhuao+XW9+Q4LqQ1OB4AXjKRq+xS1ce+NeEVnr1 JBaTapEjzX9Z3PwQsqg1iNsXzQDT04guHwsxUjNNg4Baj3LaLnzn2cCo7KJiYKUiooUdn9 u8F/+t1XDyHdPHJw9JtrFhwbHH1KlxNVuVz7sdnWNAR9kPSbbs/Wa4h5MKxBXxwrOp/FjU FLerQctAHfVMesxrtnn3eLj+xaEp8U8SQvVRydCB4Bv8XE7gh73HIhiiAGGjzw== 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 4Y8VLn2jGzzFVq; Fri, 13 Dec 2024 00:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BD0Ivdt068866; Fri, 13 Dec 2024 00:18:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BD0IvGe068863; Fri, 13 Dec 2024 00:18:57 GMT (envelope-from git) Date: Fri, 13 Dec 2024 00:18:57 GMT Message-Id: <202412130018.4BD0IvGe068863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: d7bf409a6350 - stable/13 - rtld-elf: Fix for mips with LLD 14+ 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d7bf409a63501a28357a9a9ec24628e1208d530d Auto-Submitted: auto-generated The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=d7bf409a63501a28357a9a9ec24628e1208d530d commit d7bf409a63501a28357a9a9ec24628e1208d530d Author: Jessica Clarke AuthorDate: 2024-12-13 00:18:33 +0000 Commit: Jessica Clarke CommitDate: 2024-12-13 00:18:33 +0000 rtld-elf: Fix for mips with LLD 14+ As of LLD 14, it no longer falls back to the address of .text if it can't find the entry point, and instead just uses address 0. Since the mips port has always used rtld_start as its entry point symbol but has never set RTLD_ENTRY to match (instead getting the default .rtld_start), with LLD 14+ it ends up using an entry point of 0, i.e. reinterpreting various headers and metadata sections as code, and thus quickly dies, in my case with SIGILL. This has seemingly always been a warning with LLD even when it defaulted to .text, but that went unnoticed this whole time, until now. Fix this by specifying the right symbol name. This is a direct commit to stable/13 as mips no longer exists in main. --- libexec/rtld-elf/mips/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rtld-elf/mips/Makefile.inc b/libexec/rtld-elf/mips/Makefile.inc index dc41c0cfab27..f2d2ae6d8c36 100644 --- a/libexec/rtld-elf/mips/Makefile.inc +++ b/libexec/rtld-elf/mips/Makefile.inc @@ -1,2 +1,3 @@ +RTLD_ENTRY= rtld_start CFLAGS.reloc.c+=-fno-jump-tables