HomeFreeBSD

ldconfig: small optimization

Description

ldconfig: small optimization

Swap which side of a comparison is byte-swapped by be32toh()
on little-endian architectures.

The be32toh() macro just returns the operand and big-endian
architectures and returns it byte-swapped on little-endian
architectures.

When operating on a constant argument, the compiler can perform
the swap operation at build time instead of swapping the data
read from the hints file at run time.

Reviewed by: kib
Tested by: tuexen
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D44734

Details

Provenance
seAuthored on Apr 19 2024, 2:29 PM
Reviewer
kib
Differential Revision
D44734: Create little-endian hints files on all architectures
Parents
rG178cf4b9db4b: arm: Fix a typo in a KASSERT message
Branches
Unknown
Tags
Unknown