From nobody Fri Apr 19 14:55: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 4VLd4L6CKQz5HBZB; Fri, 19 Apr 2024 14:55:46 +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 4VLd4L41pbz4MRy; Fri, 19 Apr 2024 14:55:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713538546; 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=icy7b2wQFEo2MVT8VUl0OCISeiWgHia/LQYtiaiFKpo=; b=kjgU1F0JaeJNq0eYBP9SszvwFtVLnIHfndoLK75ndS6LlR+DF1zz0LRMKpEQ0lOCiMAQuV CFbw2R3ny4G8f5MQIDSCPV0X74vKfhdNHudaNQ/qRqHziZL5igsYOuoqWUi/Sax/hV3Jtv Flb1NH79Qpti3pSplXYp3YlZwFZs0kAjIfX2LJ1dUoDl5PKE92VNpBB3yKfYRO4POHR4HR R0OfhWT8/lT9ccIz63Gv2QJOmC2tMdsJTjjAB5lK4hKTmN/EThDiEpO+JtNPDt7QcUnvR9 UL40ibwli169aFk8LI5X9VC0Xclfc0wdrwYpoLzL2uaHtnBEiJ5sCtvTAZyggQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713538546; a=rsa-sha256; cv=none; b=Sy8hZPK9Z7+dR1XrJJfr/BAthg8o/BiGGSf2ZZBuJH7M0PwWHka6FdTQdqDB5kDQg6hDuP femSuJMNUUUGADZT/U7XOSpLLHSj0ih4tjAelPjUWWW4Z4EPIzbAn29Pey4UyU3bbtHDWw +ru8V8NMEV0uwruxViZ+vD1HXFju7HYez9iXjd/kVuzgOwW7WZ1nUN0W9zPjxC0G1MR6ML zx+hUIbT03+1MOTtgxnf1y6J5pd8H9HHNR+kNWk5p2BUEVHJMotQ8nWbLdZ6q7mVXriz5g js25iWmn/Is0PULJtGyszcqo0w2qLqV/hRid6u0BeupGuMSMU34SNhu37bPdsA== 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=1713538546; 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=icy7b2wQFEo2MVT8VUl0OCISeiWgHia/LQYtiaiFKpo=; b=rP7OSEyr+tCwG0b2dtzLgEYuAhV2ZlkdHtnFqqvlOeE6Ciklzmy7GxDfr487Xl7FR6Kt67 dwOHFG8+D2Gf4CwZwShWrf97Ji1imNJm0KHT4euJke5KE8TLlhwOev339UoQSKsIPl/XsK FS+ZIatOlOfgJRI4D0QVL5uT3sspHVAB3dYWm2wrvpXB9zuRz6K6P89uvzICs3pXunEYJ9 gu0R8rhMYSLCsrcTuh7YPFWD6iKQnI2rPyilVi3vdhgk6FneRQSdsXzKdfkDuimGUNraPX xvZN+HbMNDtcfE2UGFijgMuVUb5bgHkRyYbAn1JITiqCnWElkAXFhQWUDZz1LQ== 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 4VLd4L1lZSzy2V; Fri, 19 Apr 2024 14:55: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 43JEtkrP014238; Fri, 19 Apr 2024 14:55:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43JEtkqT014235; Fri, 19 Apr 2024 14:55:46 GMT (envelope-from git) Date: Fri, 19 Apr 2024 14:55:46 GMT Message-Id: <202404191455.43JEtkqT014235@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: f221df6597df - main - ldconfig: use little-endian hints file on all architectures 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f221df6597df6b606102b329f36e20e0257308de Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=f221df6597df6b606102b329f36e20e0257308de commit f221df6597df6b606102b329f36e20e0257308de Author: Stefan Eßer AuthorDate: 2024-04-19 14:49:57 +0000 Commit: Stefan Eßer CommitDate: 2024-04-19 14:49:57 +0000 ldconfig: use little-endian hints file on all architectures Remove the test for building on a big-endian architecture, which preserved the previous default of creating the ELF hints file in native byte-order of the respective architecture. Support for little-endian hints files has been added to the run-time linker and the pkg command. This is a step towards architecture independent little-endian hints files, but support for big-endian hints files shall only be removed from the run-time linker (and ldconfig and pkg) when the last release that defaulted to hints files in host-byte has been declared EOL. Reviewed by: kib Tested by: tuexen MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44734 --- sbin/ldconfig/elfhints.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/ldconfig/elfhints.c b/sbin/ldconfig/elfhints.c index 64b3f916ba8d..97499e398c9d 100644 --- a/sbin/ldconfig/elfhints.c +++ b/sbin/ldconfig/elfhints.c @@ -246,10 +246,10 @@ update_elf_hints(const char *hintsfile, int argc, char **argv, bool merge, int i; /* - * Remove "be32toh(1) == 1" from this condition to create - * little-endian hints files on all architectures by default. + * Create little-endian hints files on all architectures unless + * ldconfig has been invoked with the -B option. */ - is_be = be32toh(1) == 1 || force_be; + is_be = force_be; if (merge) read_elf_hints(hintsfile, false, force_be); for (i = 0; i < argc; i++) {