Commit 7b77d37a561b47d (with fix in da2d6e2815d769) has added byte-order independent hints file parsing to rtld-elf, with MFC to stable/13 and stable/14 on 2024-03-29.
Equivalent code has been added to the 2 commands that operate on hints files: ldconfig in all maintained branches and the pkg-1.21.0 package.
This makes it possible to use a little-endian hints file on all architectures, with the goal to eventually remove the compatibility code that allows for either byte-order on all architectures.
While here, a small optimization has been added to take advantage of constant expression evaluation in the is_be evaluation.
Since the eventual removal of compatibility code from rtld-elf (where it slightly increases the run-time) depends on all supported releases using little-endian hints files by default, I'd want to MFC this change to stable/14 in time for FreeBSD-14.1.