I'm new to assembly. I'm currently following this ARM assembly tutorial: https://www.youtube.com/watch?v=kKtWsuuJEDs&list=PLn_It163He32Ujm-l_czgEBhbJjOUgFhg&index=1
I wrote the exact same thing as in the tutorial:
.global _start
.section .text
_start:
mov r0, #42
mov r7, #1
swi 0
and I used the exact same commands to generate the object file, then the executable:
arm-linux-gnueabi-as hello.s -o hello.o
and arm-linux-gnueabi-gcc hello.o -o hello -nostdlib
Still, I get the message -bash: ./hello: cannot execute: required file not found
when running ./hello
.
I made sure every command and every line I typed was the same as in the tutorial though... I'm working on the Raspberry pi 400 over SSH with the latest Raspberry Pi OS lite 64 bits. Could someone help me with this please ?
Thank you all for the suggestions! adding -static to the second command solved the problem.