Skip to content

Instantly share code, notes, and snippets.

@mbondaru
Last active May 2, 2024 09:54
Show Gist options
  • Save mbondaru/08d0dceeca05fb4d46c949646cf23fa8 to your computer and use it in GitHub Desktop.
Save mbondaru/08d0dceeca05fb4d46c949646cf23fa8 to your computer and use it in GitHub Desktop.
pi@raspberrypi:~/Desktop/vc4-toolchain/helloworld $ cat helloworld.c
#include <stdio.h>
int main (int argc, char* argv[])
{
int src[1000000];
printf ("Hello world!\n");
return 0;
}
pi@raspberrypi:~/Desktop/vc4-toolchain/helloworld $ vc4-elf-objdump -dr helloworld.o
helloworld.o: file format elf32-vc4
Disassembly of section .text:
00000000 <main>:
0: a0 03 stm r6,lr,(--sp)
2: 39 ef f8 f6 c2 ff add sp,sp,0xffc2f6f8
8: 46 c0 40 cf add r6,sp,0
c: 20 e6 00 09 3d 30 st r0,(r6+4000000)
12: 21 e6 04 09 3d 30 st r1,(r6+4000004)
18: 00 e8 00 00 00 00 mov r0,0x0
18: R_VC4_IMM32 .rodata
1e: 80 90 00 00 bl 1e <main+0x1e>
1e: R_VC4_PCREL27_MUL2 puts
22: 00 60 mov r0,0x0
24: d9 ec 08 09 3d 00 add sp,r6,0x3d0908
2a: 20 03 ldm r6,pc,(sp++)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment