Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable runtime use in a musl-based static binary (where dlopen will return null) #89

Closed
wants to merge 2 commits into from

Conversation

elerch
Copy link

@elerch elerch commented Apr 29, 2021

This is somewhat of a continuation of Issue #54.

These changes remove the assertion that the process module can be read by the dynamic linker. They also add assertions that if the module was not read by the dynamic linker, then symbols for HMAC/MD modules already exist.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Now that references are forced when linking statically, the assertion is
no longer necessary. See awslabs#54
@tobim
Copy link

tobim commented Oct 10, 2023

This patch makes it possible to use the library in static executables. I tested s3 transfers via aws-sdk-cpp and those worked flawlessly. Please consider merging.

@@ -122,6 +122,7 @@ bool s_resolve_hmac_102(void *module) {
if (has_102_symbols) {
FLOGF("found static libcrypto 1.0.2 HMAC symbols");
} else {
AWS_FATAL_ASSERT(!module && "Cannot read process symbols and libcrypto 1.0.2 HMAC symbols not found");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These asserts break the dynamically linked library.

@jmklix jmklix closed this Apr 22, 2024
@jmklix
Copy link
Member

jmklix commented Apr 22, 2024

We've recently added musl support. Please let us know if you run into any issues when using it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants