]> git.ipfire.org Git - thirdparty/libbsd.git/commit
Switch md5 compatibility logic back to direct linking
authorGuillem Jover <guillem@hadrons.org>
Sun, 28 Nov 2021 21:44:08 +0000 (22:44 +0100)
committerGuillem Jover <guillem@hadrons.org>
Wed, 1 Dec 2021 03:14:35 +0000 (04:14 +0100)
commite7cf8c5785b14fc8fbd37bb665a5f9a4f28c7888
tree8173ab81c228f6f1da4d980101dbc309e07b093e
parent25d35625ebd8e41756751cbb069dd607fc9fc49f
Switch md5 compatibility logic back to direct linking

When using the recent dlsym() based wrapper, we are not requiring any
symbol from libmd, as we resolve those dynamically at run-time. We were
ending up linking against libmd because in another part of the code we
require (depending on the architecture) the SHA512 functions for the
getentropy() local implementation. But that function might be provided
by the system libc on some systems, which means we end up not linking
against libmd at all.

To solve this we go back to the previous simpler solution of linking
directly, which had the main drawback of then making programs fail to
link when not specifying -lmd (on platforms that need it). And then
switch the .so link point from a symlink to a linker script, so that we
can inject the -lmd library as-needed. This is similar to what glibc is
doing.

Fixes: commit 31f034e3862debda8615a449b1c11c4d6920dcc7
.gitignore
configure.ac
src/Makefile.am
src/md5.c
test/Makefile.am