Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Created January 27, 2024 03:50
Show Gist options
  • Save lupyuen/46ffc9481c79e36274c0980f9d58f806 to your computer and use it in GitHub Desktop.
Save lupyuen/46ffc9481c79e36274c0980f9d58f806 to your computer and use it in GitHub Desktop.
hello_main.o: file format elf64-littleriscv
SYMBOL TABLE:
0000000000000000 l df *ABS* 0000000000000000 /workspaces/bookworm/apps/examples/hello/hello_main.c
0000000000000000 l O .data.ro 0000000000000010 L.0
0000000000000000 g F .text 0000000000000040 main
0000000000000000 F *UND* 0000000000000000 printf
Disassembly of section .text:
0000000000000000 <main>:
main():
0: fe010113 add sp,sp,-32
4: 00113c23 sd ra,24(sp)
8: 00813823 sd s0,16(sp)
c: 02010413 add s0,sp,32
10: 00000013 nop
14: fea43423 sd a0,-24(s0)
18: feb43023 sd a1,-32(s0)
1c: 00000517 auipc a0,0x0 1c: R_RISCV_PCREL_HI20 L.0
20: 00050513 mv a0,a0 20: R_RISCV_PCREL_LO12_I .text
24: 00000097 auipc ra,0x0 24: R_RISCV_CALL_PLT printf
28: 000080e7 jalr ra # 24 <main+0x24>
2c: 0000051b sext.w a0,zero
30: 01813083 ld ra,24(sp)
34: 01013403 ld s0,16(sp)
38: 02010113 add sp,sp,32
3c: 00008067 ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment