aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2024-04-19 14:49:57 +0000
committerStefan Eßer <se@FreeBSD.org>2024-04-19 14:49:57 +0000
commitf221df6597df6b606102b329f36e20e0257308de (patch)
tree593737b01b0ad71fbe646a5a640d7c0203450b04 /sbin
parent6b13e4cb3da28be82f9d3b8bd98e229ae107c73a (diff)
downloadsrc-f221df6597df6b606102b329f36e20e0257308de.tar.gz
src-f221df6597df6b606102b329f36e20e0257308de.zip
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
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ldconfig/elfhints.c6
1 files 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++) {