aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2021-11-03 00:53:05 +0100
committerHarmen Stoppels <harmenstoppels@gmail.com>2021-11-03 01:06:11 +0100
commit01ef723bbab53fa3004e7d7c1f7fb011e9c482cc (patch)
treefcfa8bdb57de88f6c7a62ffe729ad51b77b615c0 /README.md
parent0dbe1dfa1cc95cae185ead8d3b4f7a5586679b61 (diff)
downloadmbedtls-01ef723bbab53fa3004e7d7c1f7fb011e9c482cc.zip
mbedtls-01ef723bbab53fa3004e7d7c1f7fb011e9c482cc.tar.gz
mbedtls-01ef723bbab53fa3004e7d7c1f7fb011e9c482cc.tar.bz2
DT_NEEDED for shared builds in makefile
The makefile build specifies -L. -lmbedx509 -lmbedcrypto flags first, and only then object files referencing symbols from those libraries. In this order the linker will not add the linked libraries to the DT_NEEDED section because they are not referenced yet (at least that happens for me on ubuntu 20.04 with the default gnu compiler tools). By first specifying the object files and then the linked libraries, we do end up with libmbedx509 and libmbedcrypto in the DT_NEEDED sections. This way running dlopen(...) on libmedtls.so just works. Note that the CMake build does this by default. Signed-off-by: Harmen Stoppels <harmenstoppels@gmail.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index e6924cb..c8d9450 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ There are currently three active build systems used within Mbed TLS releases:
The main systems used for development are CMake and GNU Make. Those systems are always complete and up-to-date. The others should reflect all changes present in the CMake and Make build system, although features may not be ported there automatically.
-The Make and CMake build systems create three libraries: libmbedcrypto, libmbedx509, and libmbedtls. Note that libmbedtls depends on libmbedx509 and libmbedcrypto, and libmbedx509 depends on libmbedcrypto. As a result, some linkers will expect flags to be in a specific order, for example the GNU linker wants `-lmbedtls -lmbedx509 -lmbedcrypto`. Also, when loading shared libraries using dlopen(), you'll need to load libmbedcrypto first, then libmbedx509, before you can load libmbedtls.
+The Make and CMake build systems create three libraries: libmbedcrypto, libmbedx509, and libmbedtls. Note that libmbedtls depends on libmbedx509 and libmbedcrypto, and libmbedx509 depends on libmbedcrypto. As a result, some linkers will expect flags to be in a specific order, for example the GNU linker wants `-lmbedtls -lmbedx509 -lmbedcrypto`.
### Tool versions