aboutsummaryrefslogtreecommitdiff
path: root/sbin/ldconfig/ldconfig.8
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2024-02-28 17:49:29 +0000
committerStefan Eßer <se@FreeBSD.org>2024-02-28 17:49:29 +0000
commite0dfecadf5946b6a8ad423be4eb1c14017b3a8a7 (patch)
tree8f4ab6b3e71c18dc53ea0f8d751627a8d8a58545 /sbin/ldconfig/ldconfig.8
parentcf4d9bf8b38819da12c6d686d5cf6dbd6353cd61 (diff)
downloadsrc-e0dfecadf5946b6a8ad423be4eb1c14017b3a8a7.tar.gz
src-e0dfecadf5946b6a8ad423be4eb1c14017b3a8a7.zip
ldconfig: support hints files of either byte-order
Make the ldconfig program accept hints files in little-endian and big-endian format on all architectures. The default format is the native byte-order of the respective host. This is expected to change when a version of the pkg command is available that implements support for either byte-order in its internal ldconfig function. (Already committed in the development tree of the pkg utility, a release is expected at the end of Q1/2024). This update adds the -B option to the ldconfig program. It enforces the creation of a big-endian hints file on a little-endian host. The main purpose to is support of tests with non-native byte-order files on little-endian hosts. It will be removed when all supported FreeBSD releases use little-endian hints files by default. When little-endian hints files are generally used, support of either byte-order in libexec/rtld can also be removed. When support for big-endian hints files is no longer required, the COND_SWAP macro in ldconfig and rtld shall be replaced by le32toh(), which just return their argument on little-endian architectures. Approved by: kib MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D44093
Diffstat (limited to 'sbin/ldconfig/ldconfig.8')
-rw-r--r--sbin/ldconfig/ldconfig.811
1 files changed, 8 insertions, 3 deletions
diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8
index 47e0dfa99b50..88d99567912e 100644
--- a/sbin/ldconfig/ldconfig.8
+++ b/sbin/ldconfig/ldconfig.8
@@ -32,7 +32,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd May 15, 2021
+.Dd February 28, 2024
.Dt LDCONFIG 8
.Os
.Sh NAME
@@ -41,7 +41,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl 32
-.Op Fl Rimrv
+.Op Fl BRimrv
.Op Fl f Ar hints_file
.Op Ar directory | Ar
.Sh DESCRIPTION
@@ -105,6 +105,11 @@ Generate the hints for 32-bit ABI shared libraries
on 64-bit systems that support running 32-bit binaries.
.It Fl elf
Ignored for backwards compatibility.
+.It Fl B
+Force writing big-endian binary data´to the hints file.
+The default is to create little-endian hints files on all architectures.
+Reading of and merging into hints files preserves the endianness of the
+existing hints file.
.It Fl R
Appends pathnames on the command line to the directory list from
the hints file.
@@ -159,7 +164,7 @@ invocations with
.El
.Sh SEE ALSO
.Xr ld 1 ,
-.Xr ld-elf.so.1 ,
+.Xr ld-elf.so.1 1 ,
.Xr link 5
.Sh HISTORY
A