How to test your code on a machine with big-endian architecture 如何在大端机器上测试你的代码

How to test your code on a machine with big-endian architecture

sudo apt-get install gcc-multilib-mips-linux-gnu gcc-mips-linux-gnu qemu-user
sudo apt-get install g++-multilib-mips-linux-gnu g++-mips-linux-gnu

and then

mips-linux-gnu-gcc -g -o test -static test.c
mips-linux-gnu-g++ -g -o a.out -static test.cpp
qemu-mips ./test

posted on 2021-12-28 21:30  明天有风吹  阅读(23)  评论(0编辑  收藏  举报

导航

+V atob('d2h5X251bGw=')

请备注:from博客园