UPX NotCompressibleException

Qia*_*iao 4 upx

我最近做了一些关于可执行压缩的研究.编译test.cC语言源并在Linux中使用UPX压缩它而不是windows.它是终端列表:UPX: test.so NotCompressibleException.源代码test.c是:

int main(){
    int i = 0;
    printf("HelloWorld\n");
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

我猜是可执行文件太简单了吗?或者可能是我错过了什么?如果有人知道这个问题,请告诉我原因.如果没有人告诉我,我必须阅读源代码以找出问题.啊! 阅读源代码负担.

per*_*ror 7

输出a有几个原因NotCompressibleException,但在你的情况下,这仅仅是因为二进制文件的大小太小.UPX无法处理40Kb以下的二进制文件.

解决此问题的最佳方法是在静态模式下编译二进制文件,以获得更大的可执行文件.所以,试试吧:gcc -static -o mytest mytest.c然后upx -o mytest-upx mytest.