build: sort: explicitly tag libcrypto dependency

This adds an ELF note as per the UAPI Group's .note.dlopen spec:

  $ readelf -p .note.dlopen src/sort
  String dump of section '.note.dlopen':
    [     4]  y
    [     a]  |@FDO
    [    10]  [{"feature":"random-sort",
                "description":"Support for random sorting",
                "priority":"required",
                "soname":["libcrypto.so.3"]}]

* bootstrap.conf: Add sd-dlopen.
* src/sort.c (DLOPEN_LIBCRYPTO && HAVE_OPENSSL_MD5): Add an ELF note
with SD_ELF_NOTE_DLOPEN() so that packagers can determine the libcrypto
dependency, needed when --random-sort is specified.
* NEWS: Mention the Build-related change.
This commit is contained in:
Pádraig Brady committed 2026-09-06 23:16:55 +01:00
1 parent b2fc0baf2c
commit bff0e5412d
3 files changed
+12

No files matched your search

+3
View File
@@ -176,6 +176,9 @@ GNU coreutils NEWS -*- outline -*-
The configure option '--enable-systemd' is renamed to '--with-systemd'.
The option '--enable-systemd' was a misnomer and is now deprecated.
The 'sort' binary now uses the UAPI Group's .note.dlopen ELF note
to indicate its dependency on libcrypto.
* Noteworthy changes in release 9.11 (2026-04-20) [stable]
+1
View File
@@ -262,6 +262,7 @@ gnulib_modules="
save-cwd
savedir
savewd
sd-dlopen
select
selinux-at
setenv
+8
View File
@@ -2370,6 +2370,14 @@ getmonth (char const *month, char **ea)
# endif
# include <dlfcn.h>
/* Require distributions make OpenSSL available for hardware
optimized implementations of MD-5. */
# include "sd-dlopen.h"
SD_ELF_NOTE_DLOPEN ("random-sort",
"Support for random sorting",
SD_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED,
LIBCRYPTO_SONAME);
/* Diagnose a dynamic linking failure. */
static void
link_failure (void)