嵌入式编译器相关

arm-linux-strip

平常编译出来的动态库大小超出预期, 可以用strip 工具处理, 将去掉其中的调试信息,执行文件大小也将小很多

测试程序

#include<stdio.h>

int main()
{
    printf("hello world\n");
}
  • gcc 编译之后二进制文件大小为:8.4k , strip 之后的大小为 6.2 k
  • gcc -s 和 strip 同样的功能
➜  ls -alh a.out 
-rwxrwxr-x 1  8.4K 620 14:58 a.out
➜  strip a.out 
➜  ls -alh a.out 
-rwxrwxr-x 1  6.2K 620 14:59 a.out

猜你喜欢

转载自blog.csdn.net/z2066411585/article/details/80751878