admin管理员组

文章数量:1127905

Is it possible to write x86 (32 bit) assembly on a raspberry pi (5, if the board type matters) which is running Raspberry Pi OS? Now, I am aware that Raspberry pi is built on the ARM architecture, but I believe I can use QEMU to actually run the executable by emulating an x86 processor.

I am successfully able to compile the code (using nasm to assemble a file called 'hello.asm' -> hello.o), but I am having difficulty linking. For example,

gcc -m32 -o hello hello.o 

attempting to link and target a 32 bit architecture gives me: "Unrecognized Command-Line argument '-m32'"

Has anyone tried this/have a workaround?

本文标签: Writing 32bit x86 assembly on Raspberry piStack Overflow