Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Apr 2024 14:55:46 GMT
From:      Stefan =?utf-8?Q?E=C3=9Fer?= <se@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f221df6597df - main - ldconfig: use little-endian hints file on all architectures
Message-ID:  <202404191455.43JEtkqT014235@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/src/commit/?id=f221df6597df6b606102b329f36e20e0257308de

commit f221df6597df6b606102b329f36e20e0257308de
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2024-04-19 14:49:57 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
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++) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404191455.43JEtkqT014235>