Skip to content

Instantly share code, notes, and snippets.

@rbarraud
Created January 27, 2015 23:50
Show Gist options
  • Save rbarraud/8135d7118b158580790a to your computer and use it in GitHub Desktop.
Save rbarraud/8135d7118b158580790a to your computer and use it in GitHub Desktop.
Hello_dump_macho64
# Assembly output for main.c
# Generated at 1:16:05 am on Wednesday, January 28, 2015
# Using Debug configuration, x86_64 architecture for hello_test_macho64 target of hello_test_macho64 project
.section __TEXT,__text,regular,pure_instructions
.section __DWARF,__debug_info,regular,debug
Lsection_info:
.section __DWARF,__debug_abbrev,regular,debug
Lsection_abbrev:
.section __DWARF,__debug_aranges,regular,debug
.section __DWARF,__debug_macinfo,regular,debug
.section __DWARF,__debug_line,regular,debug
Lsection_line:
.section __DWARF,__debug_loc,regular,debug
.section __DWARF,__debug_str,regular,debug
Linfo_string:
.section __DWARF,__debug_ranges,regular,debug
Ldebug_range:
.section __DWARF,__debug_loc,regular,debug
Lsection_debug_loc:
.file 1 "/Users/rbarraud/Developer/hello_test_macho64/hello_test_macho64/main.c"
.section __TEXT,__text,regular,pure_instructions
.globl _main
.align 4, 0x90
_main: ## @main
Lfunc_begin0:
.loc 1 11 0 ## /Users/rbarraud/Developer/hello_test_macho64/hello_test_macho64/main.c:11:0
.cfi_startproc
## BB#0:
pushq %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp4:
.cfi_def_cfa_register %rbp
subq $32, %rsp
leaq L_.str(%rip), %rax
movl $0, -4(%rbp)
movl %edi, -8(%rbp)
movq %rsi, -16(%rbp)
.loc 1 13 0 prologue_end ## /Users/rbarraud/Developer/hello_test_macho64/hello_test_macho64/main.c:13:0
Ltmp5:
movq %rax, %rdi
movb $0, %al
callq _printf
movl $0, %ecx
.loc 1 14 0 ## /Users/rbarraud/Developer/hello_test_macho64/hello_test_macho64/main.c:14:0
movl %eax, -20(%rbp) ## 4-byte Spill
movl %ecx, %eax
addq $32, %rsp
popq %rbp
retq
Ltmp6:
Lfunc_end0:
.cfi_endproc
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz "Hello, World!\n"
.section __TEXT,__text,regular,pure_instructions
Ldebug_end0:
.section __DWARF,__debug_str,regular,debug
Linfo_string0:
.asciz "Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)"
Linfo_string1:
.asciz "/Users/rbarraud/Developer/hello_test_macho64/hello_test_macho64/main.c"
Linfo_string2:
.asciz "/Users/rbarraud/Developer/hello_test_macho64"
Linfo_string3:
.asciz "main"
Linfo_string4:
.asciz "int"
Linfo_string5:
.asciz "argc"
Linfo_string6:
.asciz "argv"
Linfo_string7:
.asciz "char"
.section __DWARF,__debug_info,regular,debug
L__DWARF__debug_info_begin0:
.long 125 ## Length of Unit
.short 2 ## DWARF version number
Lset0 = Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section
.long Lset0
.byte 8 ## Address Size (in bytes)
.byte 1 ## Abbrev [1] 0xb:0x76 DW_TAG_compile_unit
Lset1 = Linfo_string0-Linfo_string ## DW_AT_producer
.long Lset1
.short 12 ## DW_AT_language
Lset2 = Linfo_string1-Linfo_string ## DW_AT_name
.long Lset2
.long 0 ## DW_AT_stmt_list
Lset3 = Linfo_string2-Linfo_string ## DW_AT_comp_dir
.long Lset3
.quad 0 ## DW_AT_low_pc
.byte 2 ## Abbrev [2] 0x26:0x3d DW_TAG_subprogram
Lset4 = Linfo_string3-Linfo_string ## DW_AT_name
.long Lset4
.byte 1 ## DW_AT_decl_file
.byte 11 ## DW_AT_decl_line
.byte 1 ## DW_AT_prototyped
.long 99 ## DW_AT_type
.byte 1 ## DW_AT_external
.byte 1 ## DW_AT_accessibility
## DW_ACCESS_public
.quad Lfunc_begin0 ## DW_AT_low_pc
.quad Lfunc_end0 ## DW_AT_high_pc
.byte 1 ## DW_AT_frame_base
.byte 86
.byte 3 ## Abbrev [3] 0x46:0xe DW_TAG_formal_parameter
Lset5 = Linfo_string5-Linfo_string ## DW_AT_name
.long Lset5
.byte 1 ## DW_AT_decl_file
.byte 11 ## DW_AT_decl_line
.long 99 ## DW_AT_type
.byte 2 ## DW_AT_location
.byte 145
.byte 120
.byte 3 ## Abbrev [3] 0x54:0xe DW_TAG_formal_parameter
Lset6 = Linfo_string6-Linfo_string ## DW_AT_name
.long Lset6
.byte 1 ## DW_AT_decl_file
.byte 11 ## DW_AT_decl_line
.long 106 ## DW_AT_type
.byte 2 ## DW_AT_location
.byte 145
.byte 112
.byte 0 ## End Of Children Mark
.byte 4 ## Abbrev [4] 0x63:0x7 DW_TAG_base_type
Lset7 = Linfo_string4-Linfo_string ## DW_AT_name
.long Lset7
.byte 5 ## DW_AT_encoding
.byte 4 ## DW_AT_byte_size
.byte 5 ## Abbrev [5] 0x6a:0x5 DW_TAG_pointer_type
.long 111 ## DW_AT_type
.byte 5 ## Abbrev [5] 0x6f:0x5 DW_TAG_pointer_type
.long 116 ## DW_AT_type
.byte 6 ## Abbrev [6] 0x74:0x5 DW_TAG_const_type
.long 121 ## DW_AT_type
.byte 4 ## Abbrev [4] 0x79:0x7 DW_TAG_base_type
Lset8 = Linfo_string7-Linfo_string ## DW_AT_name
.long Lset8
.byte 6 ## DW_AT_encoding
.byte 1 ## DW_AT_byte_size
.byte 0 ## End Of Children Mark
L__DWARF__debug_info_end0:
.section __DWARF,__debug_abbrev,regular,debug
.byte 1 ## Abbreviation Code
.byte 17 ## DW_TAG_compile_unit
.byte 1 ## DW_CHILDREN_yes
.byte 37 ## DW_AT_producer
.byte 14 ## DW_FORM_strp
.byte 19 ## DW_AT_language
.byte 5 ## DW_FORM_data2
.byte 3 ## DW_AT_name
.byte 14 ## DW_FORM_strp
.byte 16 ## DW_AT_stmt_list
.byte 6 ## DW_FORM_data4
.byte 27 ## DW_AT_comp_dir
.byte 14 ## DW_FORM_strp
.byte 17 ## DW_AT_low_pc
.byte 1 ## DW_FORM_addr
.byte 0 ## EOM(1)
.byte 0 ## EOM(2)
.byte 2 ## Abbreviation Code
.byte 46 ## DW_TAG_subprogram
.byte 1 ## DW_CHILDREN_yes
.byte 3 ## DW_AT_name
.byte 14 ## DW_FORM_strp
.byte 58 ## DW_AT_decl_file
.byte 11 ## DW_FORM_data1
.byte 59 ## DW_AT_decl_line
.byte 11 ## DW_FORM_data1
.byte 39 ## DW_AT_prototyped
.byte 12 ## DW_FORM_flag
.byte 73 ## DW_AT_type
.byte 19 ## DW_FORM_ref4
.byte 63 ## DW_AT_external
.byte 12 ## DW_FORM_flag
.byte 50 ## DW_AT_accessibility
.byte 11 ## DW_FORM_data1
.byte 17 ## DW_AT_low_pc
.byte 1 ## DW_FORM_addr
.byte 18 ## DW_AT_high_pc
.byte 1 ## DW_FORM_addr
.byte 64 ## DW_AT_frame_base
.byte 10 ## DW_FORM_block1
.byte 0 ## EOM(1)
.byte 0 ## EOM(2)
.byte 3 ## Abbreviation Code
.byte 5 ## DW_TAG_formal_parameter
.byte 0 ## DW_CHILDREN_no
.byte 3 ## DW_AT_name
.byte 14 ## DW_FORM_strp
.byte 58 ## DW_AT_decl_file
.byte 11 ## DW_FORM_data1
.byte 59 ## DW_AT_decl_line
.byte 11 ## DW_FORM_data1
.byte 73 ## DW_AT_type
.byte 19 ## DW_FORM_ref4
.byte 2 ## DW_AT_location
.byte 10 ## DW_FORM_block1
.byte 0 ## EOM(1)
.byte 0 ## EOM(2)
.byte 4 ## Abbreviation Code
.byte 36 ## DW_TAG_base_type
.byte 0 ## DW_CHILDREN_no
.byte 3 ## DW_AT_name
.byte 14 ## DW_FORM_strp
.byte 62 ## DW_AT_encoding
.byte 11 ## DW_FORM_data1
.byte 11 ## DW_AT_byte_size
.byte 11 ## DW_FORM_data1
.byte 0 ## EOM(1)
.byte 0 ## EOM(2)
.byte 5 ## Abbreviation Code
.byte 15 ## DW_TAG_pointer_type
.byte 0 ## DW_CHILDREN_no
.byte 73 ## DW_AT_type
.byte 19 ## DW_FORM_ref4
.byte 0 ## EOM(1)
.byte 0 ## EOM(2)
.byte 6 ## Abbreviation Code
.byte 38 ## DW_TAG_const_type
.byte 0 ## DW_CHILDREN_no
.byte 73 ## DW_AT_type
.byte 19 ## DW_FORM_ref4
.byte 0 ## EOM(1)
.byte 0 ## EOM(2)
.byte 0 ## EOM(3)
.section __DWARF,__debug_aranges,regular,debug
.long 44 ## Length of ARange Set
.short 2 ## DWARF Arange version number
Lset9 = L__DWARF__debug_info_begin0-Lsection_info ## Offset Into Debug Info Section
.long Lset9
.byte 8 ## Address Size (in bytes)
.byte 0 ## Segment Size (in bytes)
.space 4,255
.quad Lfunc_begin0
Lset10 = Ldebug_end0-Lfunc_begin0
.quad Lset10
.quad 0 ## ARange terminator
.quad 0
.section __DWARF,__debug_ranges,regular,debug
Lgnu_ranges0:
.section __DWARF,__apple_names,regular,debug
Lnames_begin:
.long 1212240712 ## Header Magic
.short 1 ## Header Version
.short 0 ## Header Hash Function
.long 1 ## Header Bucket Count
.long 1 ## Header Hash Count
.long 12 ## Header Data Length
.long 0 ## HeaderData Die Offset Base
.long 1 ## HeaderData Atom Count
.short 1 ## DW_ATOM_die_offset
.short 6 ## DW_FORM_data4
.long 0 ## Bucket 0
.long 2090499946 ## Hash in Bucket 0
.long LNames0-Lnames_begin ## Offset in Bucket 0
LNames0:
Lset11 = Linfo_string3-Linfo_string ## main
.long Lset11
.long 1 ## Num DIEs
.long 38
.long 0
.section __DWARF,__apple_objc,regular,debug
Lobjc_begin:
.long 1212240712 ## Header Magic
.short 1 ## Header Version
.short 0 ## Header Hash Function
.long 1 ## Header Bucket Count
.long 0 ## Header Hash Count
.long 12 ## Header Data Length
.long 0 ## HeaderData Die Offset Base
.long 1 ## HeaderData Atom Count
.short 1 ## DW_ATOM_die_offset
.short 6 ## DW_FORM_data4
.long -1 ## Bucket 0
.section __DWARF,__apple_namespac,regular,debug
Lnamespac_begin:
.long 1212240712 ## Header Magic
.short 1 ## Header Version
.short 0 ## Header Hash Function
.long 1 ## Header Bucket Count
.long 0 ## Header Hash Count
.long 12 ## Header Data Length
.long 0 ## HeaderData Die Offset Base
.long 1 ## HeaderData Atom Count
.short 1 ## DW_ATOM_die_offset
.short 6 ## DW_FORM_data4
.long -1 ## Bucket 0
.section __DWARF,__apple_types,regular,debug
Ltypes_begin:
.long 1212240712 ## Header Magic
.short 1 ## Header Version
.short 0 ## Header Hash Function
.long 2 ## Header Bucket Count
.long 2 ## Header Hash Count
.long 20 ## Header Data Length
.long 0 ## HeaderData Die Offset Base
.long 3 ## HeaderData Atom Count
.short 1 ## DW_ATOM_die_offset
.short 6 ## DW_FORM_data4
.short 3 ## DW_ATOM_die_tag
.short 5 ## DW_FORM_data2
.short 4 ## DW_ATOM_type_flags
.short 11 ## DW_FORM_data1
.long 0 ## Bucket 0
.long 1 ## Bucket 1
.long 193495088 ## Hash in Bucket 0
.long 2090147939 ## Hash in Bucket 1
.long Ltypes0-Ltypes_begin ## Offset in Bucket 0
.long Ltypes1-Ltypes_begin ## Offset in Bucket 1
Ltypes0:
Lset12 = Linfo_string4-Linfo_string ## int
.long Lset12
.long 1 ## Num DIEs
.long 99
.short 36
.byte 0
.long 0
Ltypes1:
Lset13 = Linfo_string7-Linfo_string ## char
.long Lset13
.long 1 ## Num DIEs
.long 121
.short 36
.byte 0
.long 0
.subsections_via_symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment