books/apitue/sample-code/05/compilechain/hello.s

67 lines
992 B
ArmAsm
Raw Normal View History

2024-01-20 14:39:54 +00:00
.file "hello.i"
.text
.section .rodata
.LC0:
.string "avocado"
.LC1:
.string "%s: great on anything.\n"
.text
.globl func2
.type func2, @function
func2:
.LFB3:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
movl $.LC0, %esi
movl $.LC1, %edi
movl $0, %eax
call printf
nop
popq %rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE3:
.size func2, .-func2
.globl func1
.type func1, @function
func1:
.LFB4:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
call func2
nop
popq %rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE4:
.size func1, .-func1
.globl main
.type main, @function
main:
.LFB5:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
call func1
movl $0, %eax
popq %rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE5:
.size main, .-main
.ident "GCC: (nb4 20200810) 7.5.0"