You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue tracker is ONLY used for reporting bugs.
Please use stackoverflow for supporting issues.
What's the problem (or question)?
UPX fails to compress a shared Rust library built for the Armv7 architecture (linked with Android Studio's NDK linker for Arm).
Instead, it terminates with the following output
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX git-17cf73 Markus Oberhumer, Laszlo Molnar & John Reiser Jun 19th 2024
File size Ratio Format Name
-------------------- ------ ----------- -----------
upx: librust_native.so: CantPackException: bad DT_GNU_HASH n_bucket{0x1} <= buckets[0]{0x1c}
Packed 0 files.
WARNING: this is an unstable beta version - use for testing only! Really.
Interestingly, this problem does not occur when the library is built for Armv8. In that case, UPX compresses it successfully and it runs without problems.
This issue is stale because it has been open for 90 days with no activity. Please remove the stale label or add a comment or this issue will be closed in 30 days.
This issue tracker is ONLY used for reporting bugs.
Please use stackoverflow for supporting issues.
What's the problem (or question)?
UPX fails to compress a shared Rust library built for the Armv7 architecture (linked with Android Studio's NDK linker for Arm).
Instead, it terminates with the following output
Interestingly, this problem does not occur when the library is built for Armv8. In that case, UPX compresses it successfully and it runs without problems.
What should have happened?
UPX should have successfully packed the library.
Do you have an idea for a solution?
Unfortunately not.
How can we reproduce the issue?
Download and unpack librust_native.so.gz
Try to compress librust_native.so with
upx --android-shlib
(though packing without the android-shlib parameter has the same effect)UPX should be unable to pack the library
The librust_native.so binary is a simple library, built to evaluate UPX for our usecase, with the following source code:
We used rustc version 1.78.0 to compile it.
Please tell us details about your environment.
upx --version
):upx 4.2.4-devel.42+git-17cf7300
The same error occurs with the regular 4.2.4 release
EndeavourOS 6.9.6-arch1-1
x86_64
Android 14.0, API version 34
Armv7
The text was updated successfully, but these errors were encountered: