mips 组装问题

发布于 2024-08-04 12:35:13 字数 178 浏览 3 评论 0原文

我的 mips 端口有问题...每当我尝试使用 printf 语句编译 C 程序时,它都会发出警告,指出它无法识别,并且在生成的汇编文件中没有 .asciiz 指令...该字符串是不在那里....有人可以告诉我为什么吗?

构建裸机交叉编译器和交叉工具链之间有什么区别

我是交叉编译器世界的新手......:-)

I have aproblem with my mips port....Whenever i try to compile a C program with a printf statement it gives a warning saying it is not recognized and in the generated assemble file there is no .asciiz directive...The string is not there....can anyone please tell me why??

And also what is the difference in between building a bare metal cross compiler and a cross-toolchain

i am new to the world of cross compilers....:-)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

ヤ经典坏疍 2024-08-11 12:35:13

确保

#include <stdio.h>

您的 C 源文件顶部有使用 printf 的内容。

Make sure you have

#include <stdio.h>

at the top of your C source files that use printf.

假扮的天使 2024-08-11 12:35:13

构建裸机交叉编译器和交叉工具链之间有什么区别

交叉编译器(即 gcc )之间的区别是什么?是交叉工具链的一部分。

除了 gcc 之外,我们还需要

  • binutils (针对目标平台)
  • kernel (针对目标平台)
  • glibc (针对目标平台)

查看 本书了解详细信息。

And also what is the difference in between building a bare metal cross compiler and a cross-toolchain

cross compiler (which is gcc ) is part of the cross-toolchain.

Beside gcc , we still need

  • binutils (for target platfrom)
  • kernel (of target platfrom)
  • glibc (for target platfrom)

check out this book for detail.

酸甜透明夹心 2024-08-11 12:35:13

你编译得怎么样? Eclipse 还是命令行?我在使用 Eclipse 时遇到了类似的问题,并发现 Eclipse 中的处理器系列为“空”。这导致汇编器无法理解编译器的输出,类似于您所描述的症状。

交叉编译器与普通编译器并没有什么不同:

  • 输出的二进制文件可能与构建计算机不兼容(可以针对多个平台)
  • 编译器可能能够输出许多不同平台的代码

对于GCC,它可能会加载一个或多个处理器系列。 Cygwin 附带的 GCC 相当有限(i686);在Linux中你会有更多的选择。我建议你提出一个关于如何设置交叉编译的不同问题,你需要帮助。

How are you compiling? Eclipse or command line? I had a similar problem using Eclipse and found out that the processor family was 'empty' in Eclipse. This resulted in the assembler not understanding the output of the compiler, similar to the symptoms you've described.

Cross compilers are not all that different from normal compilers:

  • outputted binary may be incompatible to the build computer (can be for multiple platforms)
  • compiler may be able to output many different platform's code

In case of GCC, it may be loaded with one or more processor families. The GCC which comes with Cygwin is pretty limited (i686); in Linux you'll have more choice.I suggsest you raise a different question on how to set up cross-compilation of you need help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文