-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
3 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Bugfix | ||
* Fix issue in Makefile on Linux with SHARED=1, that caused shared libraries | ||
not to list other shared libraries they need. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters