-
Notifications
You must be signed in to change notification settings - Fork 258
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
No libdl.a static library #472
Comments
@enh: does our libdl actually work? I know dimitry was working on it, but idk if that got finished. @ehem: bionic didn't have a libdl.a until very recently. It looks like we do have one now, but there's still the matter that we haven't actually been able to update the static libraries in the NDK for some time. (now that libc++ is in better shape, I should be able to look at this for r16) |
Android doesn't have a real libdl.a, and no one is working on it. |
I'm unsure whether you meant Android didn't have a real libdl.a, or Android didn't have a real libdl; but for a fake library that no one is working on, libdl.so certainly seems to work pretty well. Guessing this should be straightforward once you've regained the ability to update static libraries. |
no, there's no libdl.a, only libdl.so, and libdl.so is a special case that's intercepted by the dynamic linker. a libdl.a would be a ton of work, and isn't likely to happen any time soon. |
Are you sure about "libdl.so is a special case that's intercepted by the dynamic linker"? I was under the impression it was a genuine library handling all of the dlopen()/dlsym()/dlclose() functionality internally. dlopen() more or less being an open(, O_RDONLY), followed by a mmap(,, PROT_EXEC|PROT_READ,,,0), then a bit of library initialization and setup a data structures to make dlsym()'s job faster. One simple refutation is, why is libdl.so present on all the Android devices I have at hand if it wasn't needed at runtime? Sure, the space savings from removing one small shared object isn't huge, but I'd someone to have purged an unnecessary extra library if they could... For the heck of it,
At that size it can't be all that much work. |
the source is in bionic/libdl/ if you'd care to look. the code that does the real work is all in bionic/linker/ instead. |
SSIA, there is no static version of the libdl library
This makes static builds which attempt to dynamically open other libraries impossible. Missing libz.a or libm.a could be worked around by using dlopen()/dlsym()/dlclose(), but missing libdl.a cannot be worked around (unless one is an expert with writing one's own dynamic linker).
Environment Details
find ${NDK_DIR} -name libdl.a
=> no results)The text was updated successfully, but these errors were encountered: