无法在initramfs x86_64上执行c可执行文件

时间:2016-05-16 14:48:52

标签: c linux

我正在使用带有initramfs的嵌入式主板,我正在尝试在基于x86_64的主板上执行c文件。

当我尝试执行一个简单的hello world程序时,它会给出 sh:./ hello:not found error , 使用gcc hello.c --static -o hello,一切运作良好。

现在我有另一个c文件,它依赖于libpthread(pthread函数)和librt

如果我尝试使用gcc pthread.c -o pthread -lpthread -lrt进行编译,则结果为 sh:./pthread:not found

我不能在这里使用--static选项,因为它取决于动态库。

0 个答案:

没有答案
相关问题