对了,还有个问题:
glibc里有些功能是会动态加载so的(虽然你的代码不一定会触发,但需要了解并测试一下),所以最好是用uClibc或者musl libc 之类的来全静态链接,而不是用libgcc。
还有抛异常的问题:
There are several situations in which an application should use the shared libgcc instead of the static version. The most common of these is when the application wishes to throw and catch exceptions across different shared libraries. In that case, each of the libraries as well as the application itself should use the shared libgcc.
【 在 lwp 的大作中提到: 】
: 编译的时候用上-static-libgcc -static-libstdc++
: 把这两个东西都静态链进去,是不是就行了?
:
--
FROM 222.130.138.*