我键入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
我已经在VMware工作站上建立了Linux内核调试环境。但是,当我尝试连接正确的gdb时,我无法设置任何断点或检查任何内核符号。
目标机(debugee) Ubuntu 18:我已经用以下指令编译了linux内核5.0-0:
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_DWARF4=y
CONFIG_DEBUG_FS=y
# CONFIG_DEBUG_SECTION_MISMATCH is not set
#
我正在尝试使用Yocto SDK构建一个应用程序。编译运行良好,但当涉及到链接时,会出现以下链接器错误: ...
/opt/mydistro/1.0.0/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/8.3.0/real-ld: /opt/mydistro/1.0.0/sysroots/cortexa9t2hf-neon-poky-linux-gnueabi/usr/lib/libc.a(getcontext.o): in function `getcon
我不清楚clang使用的汇编程序。使用AFAIK原生的又名GNU汇编器和链接器(与gcc一起提供)。
clang -v main.c
clang version 3.4.2
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.5.3
Found ca
我使用cygwin在windows中构建了以'powerpc-eabi‘为目标的gcc交叉编译器。
在组装下面的代码lis r4, %hi(IMMR_OFFSET)时,我得到了以下代码
错误。
init/code/sfiles/init_core.s:141: Error: bad expression
init/code/sfiles/init_core.s:141: Error: syntax error; found `h', expected `,'
init/code/sfiles/init_core.s:141: Error: junk at end o