ARM simple hello word run with qemu on x86 linux kernel

I tried to create a simple hello world arm file and I tried to run with qemu but not work…
The steps I used can be found on my fedora blogger .

Adăugată în arm, f42, qemukvm

Please repeat the steps here for the record, so that replies will have the question.

Wait F42 is already branched off? Isnt that still rawhide?

Today I tested the creation of a program that works on ARM processors and tested with QEMU emulator in Fedora 42.

I install with dnf5 these fedora packages:

[root@fedora mythcat]# dnf5 clean all
[root@fedora mythcat]# dnf5 install qemu-system-arm
[root@fedora mythcat]# dnf5 install arm-none-eabi-gcc gcc-arm-linux-gnu gcc-c++-arm-linux-gnu
[root@fedora mythcat]# dnf5 install arm-none-eabi-newlib.noarch 
...
[root@fedora mythcat]# dnf5 install binutils-devel

I create a new folder into may pagure account to test this issue with QEMU:

[mythcat@fedora mythcat]$ mkdir ARMProjects
[mythcat@fedora mythcat]$ cd ARMProjects/
[mythcat@fedora ARMProjects]$ qemu-system-arm --version
QEMU emulator version 9.1.0 (qemu-9.1.0-2.fc42)

I create a default assembly file for ARM named hello.s:

[mythcat@fedora ARMProjects]$ cat hello.s 
.global _start

_start:
    mov r0, #1     
    mov r7, #4     
    str r0, [r7]
    bx lr

Let’s see how this means:
The compile of the file:

[mythcat@fedora ARMProjects]$ arm-none-eabi-gcc -nostartfiles -lc hello.s -o hello.o
[mythcat@fedora ARMProjects]$ ls
hello.o  hello.s

Let’s see the hello.o file:

[mythcat@fedora ARMProjects]$ nm hello.o
00008000 t $a
00009010 T __bss_end__
00009010 T _bss_end__
00009010 T __bss_start
00009010 T __bss_start__
00009010 T __data_start
00009010 T _edata
00009010 T __end__
00009010 T _end
00080000 B _stack
00008000 T _start
[mythcat@fedora ARMProjects]$ objdump -f hello.o

hello.o:     file format elf32-little
architecture: UNKNOWN!, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED

yes, but I asking to see if all of these packages with tools are working or not. A simple task to build an arm application and test it with the qemu.

Can you build and run a hello.c example?

if I ask here then no , you can see only that file