-
Notifications
You must be signed in to change notification settings - Fork 246
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
Add Android support to gimli #415
Conversation
Add dl_iterate_phdr to Android Adds the `dl_iterate_phdr` function for Android targets. This is required for Android support in `gimli` and by proxy, `backtrace`. I tested this in [`backtrace`](rust-lang/backtrace-rs#415) both in an i686 emulator and a physical arm64 device. This API is only available on Version 21+. I'm not sure how that's typically handled in `libc`, so I added a doc comment. Let me know what else is needed!
@alexcrichton Do you have any suggestions for handling the Android API version check? Options that I've thought of:
|
Thanks for this! I'd probably say that the second option, using the same |
4d8cc0d
to
b75d868
Compare
Looks great to me! I'm happy to merge once |
b75d868
to
f4af9fa
Compare
f4af9fa
to
6fe2681
Compare
Thanks again for the review @alexcrichton. |
Looks great to me, thanks! |
Awesome. Can we get a release so we can integrate this? |
Sure thing, done now! |
Thanks! |
Confirmed working! Thanks all! |
Depends on rust-lang/libc#2144
Resolves #351
dl_iterate_phdr
was added in API Version 21; however, it's very old and I couldn't figure out how to build for it. I believe this will fail to link on API version 20 and below, but I'm not certain.Any suggestions for the best way to handle it? Any suggestions for testing would be appreciated as well.