【发布时间】:2022-07-18 14:41:02
【问题描述】:
我正在尝试为 MIPS 交叉编译 hsflowd,但无法摆脱共享库。
我正在为 Atehros MIPS(softfloat、big endian)使用 openwrt 工具链。程序在路由器上运行,但启动后我得到调试条目:
dbg1: dlopen(/etc/hsflowd/modules/mod_pcap.so) failed : Dynamic loading not supported
dbg1: dlopen(NULL) failed : Dynamic loading not supported
dbg1: dlopen(/etc/hsflowd/modules/mod_tcp.so) failed : Dynamic loading not supported
dbg1: dlopen(NULL) failed : Dynamic loading not supported
我正在使用 CFlags 进行编译:-static -s
mod_pcap.o 和 mod_tcp.o 也是之前构建并链接的。 那么问题来了,程序为什么要加载动态库呢?
是否有任何其他选项可以传递给编译器以将所有库构建到可执行文件中?
感谢您的任何建议
【问题讨论】:
标签: gcc shared-libraries mips cross-compiling dynamic-loading