我需要严格地优化我的可执行文件的大小(ARM
个开发),并且
我注意到,在我当前的构建方案(gcc
+ld
)中,未使用的符号没有被剥离.
将arm-strip --strip-unneeded
用于生成的可执行文件/库不会改变可执行文件(I have no idea why, maybe it simply can't)的输出大小.
如何修改我的建筑管线,以便从生成的文件中删除未使用的符号?
我甚至不会想到这一点,但我目前的嵌入式环境不是很"强大",而且
Update:个
不幸的是,我使用的当前gcc
版本没有-dead-strip
选项,ld
的-ffunction-sections... + --gc-sections
没有给结果输出带来任何显着差异.
I'm shocked that this even became a problem, because I was sure that 100 should automatically strip unused symbols (why do they even have to keep them?).