~/c_program/test$ cat test.c
#include <stdio.h>
long user_add(long x, long y)
{
long z = x + y;
return z;
}
long main(long argc, char **argv)
{
long x = 5;
long y = 6;
long z = user_add(x, y);
return 0;
}
gcc -g test.c -o test
objdump -D -S test > test.txt
0000000000000750 <frame_dummy>:
750: 17ffffdc b 6c0 <register_tm_clones>
0000000000000754 <user_add>:
#include <stdio.h>
long user_add(long x, long y)
{
754: d10083ff sub sp, sp, #0x20
758: f90007e0 str x0, [sp, #8]
75c: f90003e1 str x1, [sp]
long z = x + y;
760: f94007e1 ldr x1, [sp, #8]
764: f94003e0 ldr x0, [sp]
768: 8b000020 add x0, x1, x0
76c: f9000fe0 str x0, [sp, #24]
return z;
770: f9400fe0 ldr x0, [sp, #24]
}
774: 910083ff add sp, sp, #0x20
778: d65f03c0 ret
000000000000077c <main>:
long main(long argc, char **argv)
{
77c: a9bc7bfd stp x29, x30, [sp, #-64]!
780: 910003fd mov x29, sp
784: f9000fe0 str x0, [sp, #24]
788: f9000be1 str x1, [sp, #16]
long x = 5;
78c: d28000a0 mov x0, #0x5 // #5
790: f9001fe0 str x0, [sp, #56]
long y = 6;
794: d28000c0 mov x0, #0x6 // #6
798: f9001be0 str x0, [sp, #48]
long z = user_add(x, y);
79c: f9401be1 ldr x1, [sp, #48]
7a0: f9401fe0 ldr x0, [sp, #56]
7a4: 97ffffec bl 754 <user_add>
7a8: f90017e0 str x0, [sp, #40]
return 0;
7ac: d2800000 mov x0, #0x0 // #0
}
7b0: a8c47bfd ldp x29, x30, [sp], #64
7b4: d65f03c0 ret
7b8: d503201f nop
7bc: d503201f nop
00000000000007c0 <__libc_csu_init>:
|