我在汇编代码方面遇到了一些问题。我正在尝试调用C函数print。我用以下命令编译文件:
gcc helloC.s -o hello
我得到的错误如下:
/tmp/cc0SwfB8.o: In function `_start':
(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o:(.text+0x0): first defined here
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../.
我键入gcc hello.c,然后会出现以下内容:
gcc: internal compiler error: Illegal instruction (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
hello.c只是:
int main()
{
return 0;
}
我想不出有什么方法可以让它变得更简单!(这里的print
我是linux的新手,我尝试编译这段代码https://elixir.bootlin.com/linux/v4.0/source/drivers/w1/slaves/w1_ds2433.c (我的目标是创建一个ds2433.ko,如果它能工作的话是ds28ec20.ko) 当我编译ds2433.c时,我得到的是: In file included from /usr/include/kernel.h:8:0, from w1_ds2433.c:8:
/usr/include/linux/linkage.h:8:10: fatal error: asm/linkage.h: No such f