有什么办法可以编译&在小端电脑上以大端方式运行程序?

发布于 2024-12-06 06:38:01 字数 128 浏览 2 评论 0原文

看到我已经为大端写了一个程序,现在我没有大端机器,但我想检查我的程序是否在大端上正常工作,那么我如何在我的小端电脑上检查这一点?

有在线虚拟大端编译器吗?

注意:我已经用谷歌搜索过这个问题,但没有得到任何结果。

see i have written one program for big endian now i dont have big endian machine but i want to check whether my program will works correctly or not on big endian so how can i check that on my little endian pc.?

Is there any online virtual big-endian compiler ?

note : i have googled about this but did not get anything.

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

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

发布评论

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

评论(2

情绪少女 2024-12-13 06:38:01

qemu 可以虚拟化各种架构,其中包括大端架构。

qemu can virtualize all sorts of architectures, amongst then big endian ones.

傲鸠 2024-12-13 06:38:01

Qemu 作为模拟器/虚拟器很有用,即用于运行程序,但您首先需要一些东西来编译它。

一旦您选择了 qemu 支持的大端架构(例如 PowerPC),您将需要一个在您的 PC 上运行但为该架构(例如 PowerPC)生成二进制文件的交叉编译器

如果您非常幸运,您的发行版包含一些二进制文件。但是,在大多数情况下,您可能被迫自己编译 binutilsglibcgcc

Qemu is useful as an emulator/virtualizer, i.e. for running the program, but you'll need something to compile it in the first place.

Once you have chosen a big-endian architecture supported by qemu, for example PowerPC, you'll need a cross-compiler which runs on your PC but produces binaries for this architecture (e.g. PowerPC).

If you're very lucky, your distribution contains some binaries. However, in most cases, you might be forced to compile binutils, glibc and gcc yourself.

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