Hi, I have an executable compiled for ARM9 platform and several dynamic libraries which it use. I wrote them all, so I have the sources and compiling them. I am trying to compress all of them with UPX.
The executable itself is OK with UPX, but when I compress any of the .so libraries, the executable gives segmentation fault upon execution.
When I test with -t option, executable is fine. But the libraries are showing "Compressed data violation".
bilal@linux-bilal: /nfs/lib> upx -t libMngrModuleDummy.so
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2011
UPX 3.08 Markus Oberhumer, Laszlo Molnar & John Reiser Dec 12th 2011
testing libMngrModuleDummy.so
upx: libMngrModuleDummy.so: Exception: compressed data violation
Tested 1 file: 0 ok, 1 error.
I have downloaded and used upx 3.09, but the result is the same.
I also compiled UPX from latest source and use --lzma, but the result is the same.
I tried -1 and -9 options for different compression schemes, but the result is the same.
I am attaching one of the uncompressed libraries, which is the smallest and simplest one.
Could you please help me figure it out?
Regards.
By the way, when I compile them for PC, the upx -t gives the same error but executable runs without any problem, with all the libraries and exe itself UPX'd.
I am attaching the same uncompressed library compiled for PC.
Thank you for attaching the test cases. There was a bug in handling 4-byte alignment inside shared libraries. Fixed by revision 65c16b17d69c at tip of source.
SIGSEGV at execution is next for investigation.