187 lines · plain
1# This assembly file was generated from the following trivial C code:2# $ cat scattered.c 3# int bar = 42;4# $ clang -S -arch armv7 -g scattered.c5# $ clang -c -o 1.o scattered.s6#7# Then I edited the debug info bellow to change the DW_AT_location of the bar8# variable from '.long _bar' to '.long _bar + 16' in order to generate a9# scattered reloc (I do not think LLVM will generate scattered relocs in10# debug info by itself).11 12 .section __TEXT,__text,regular,pure_instructions13 .ios_version_min 5, 014 .syntax unified15 .file 1 "scattered.c"16 .section __DATA,__data17 .globl _bar @ @bar18 .p2align 219_bar:20 .long 42 @ 0x2a21 22 .section __DWARF,__debug_str,regular,debug23Linfo_string:24 .asciz "clang version 3.9.0 (trunk 259311)" @ string offset=025 .asciz "scattered.c" @ string offset=3526 .asciz "/tmp" @ string offset=4727 .asciz "bar" @ string offset=5228 .asciz "int" @ string offset=5629 .section __DWARF,__debug_loc,regular,debug30Lsection_debug_loc:31 .section __DWARF,__debug_abbrev,regular,debug32Lsection_abbrev:33 .byte 1 @ Abbreviation Code34 .byte 17 @ DW_TAG_compile_unit35 .byte 1 @ DW_CHILDREN_yes36 .byte 37 @ DW_AT_producer37 .byte 14 @ DW_FORM_strp38 .byte 19 @ DW_AT_language39 .byte 5 @ DW_FORM_data240 .byte 3 @ DW_AT_name41 .byte 14 @ DW_FORM_strp42 .byte 16 @ DW_AT_stmt_list43 .byte 6 @ DW_FORM_data444 .byte 27 @ DW_AT_comp_dir45 .byte 14 @ DW_FORM_strp46 .byte 0 @ EOM(1)47 .byte 0 @ EOM(2)48 .byte 2 @ Abbreviation Code49 .byte 52 @ DW_TAG_variable50 .byte 0 @ DW_CHILDREN_no51 .byte 3 @ DW_AT_name52 .byte 14 @ DW_FORM_strp53 .byte 73 @ DW_AT_type54 .byte 19 @ DW_FORM_ref455 .byte 63 @ DW_AT_external56 .byte 12 @ DW_FORM_flag57 .byte 58 @ DW_AT_decl_file58 .byte 11 @ DW_FORM_data159 .byte 59 @ DW_AT_decl_line60 .byte 11 @ DW_FORM_data161 .byte 2 @ DW_AT_location62 .byte 10 @ DW_FORM_block163 .byte 0 @ EOM(1)64 .byte 0 @ EOM(2)65 .byte 3 @ Abbreviation Code66 .byte 36 @ DW_TAG_base_type67 .byte 0 @ DW_CHILDREN_no68 .byte 3 @ DW_AT_name69 .byte 14 @ DW_FORM_strp70 .byte 62 @ DW_AT_encoding71 .byte 11 @ DW_FORM_data172 .byte 11 @ DW_AT_byte_size73 .byte 11 @ DW_FORM_data174 .byte 0 @ EOM(1)75 .byte 0 @ EOM(2)76 .byte 0 @ EOM(3)77 .section __DWARF,__debug_info,regular,debug78Lsection_info:79Lcu_begin0:80 .long 52 @ Length of Unit81 .short 2 @ DWARF version number82Lset0 = Lsection_abbrev-Lsection_abbrev @ Offset Into Abbrev. Section83 .long Lset084 .byte 4 @ Address Size (in bytes)85 .byte 1 @ Abbrev [1] 0xb:0x2d DW_TAG_compile_unit86 .long 0 @ DW_AT_producer87 .short 12 @ DW_AT_language88 .long 35 @ DW_AT_name89Lset1 = Lline_table_start0-Lsection_line @ DW_AT_stmt_list90 .long Lset191 .long 47 @ DW_AT_comp_dir92 .byte 2 @ Abbrev [2] 0x1e:0x12 DW_TAG_variable93 .long 52 @ DW_AT_name94 .long 48 @ DW_AT_type95 .byte 1 @ DW_AT_external96 .byte 1 @ DW_AT_decl_file97 .byte 1 @ DW_AT_decl_line98 .byte 5 @ DW_AT_location99 .byte 3100 .long _bar + 16101 .byte 3 @ Abbrev [3] 0x30:0x7 DW_TAG_base_type102 .long 56 @ DW_AT_name103 .byte 5 @ DW_AT_encoding104 .byte 4 @ DW_AT_byte_size105 .byte 0 @ End Of Children Mark106 .section __DWARF,__debug_ranges,regular,debug107Ldebug_range:108 .section __DWARF,__debug_macinfo,regular,debug109 .byte 0 @ End Of Macro List Mark110 .section __DWARF,__apple_names,regular,debug111Lnames_begin:112 .long 1212240712 @ Header Magic113 .short 1 @ Header Version114 .short 0 @ Header Hash Function115 .long 1 @ Header Bucket Count116 .long 1 @ Header Hash Count117 .long 12 @ Header Data Length118 .long 0 @ HeaderData Die Offset Base119 .long 1 @ HeaderData Atom Count120 .short 1 @ DW_ATOM_die_offset121 .short 6 @ DW_FORM_data4122 .long 0 @ Bucket 0123 .long 193487034 @ Hash in Bucket 0124 .long LNames0-Lnames_begin @ Offset in Bucket 0125LNames0:126 .long 52 @ bar127 .long 1 @ Num DIEs128 .long 30129 .long 0130 .section __DWARF,__apple_objc,regular,debug131Lobjc_begin:132 .long 1212240712 @ Header Magic133 .short 1 @ Header Version134 .short 0 @ Header Hash Function135 .long 1 @ Header Bucket Count136 .long 0 @ Header Hash Count137 .long 12 @ Header Data Length138 .long 0 @ HeaderData Die Offset Base139 .long 1 @ HeaderData Atom Count140 .short 1 @ DW_ATOM_die_offset141 .short 6 @ DW_FORM_data4142 .long -1 @ Bucket 0143 .section __DWARF,__apple_namespac,regular,debug144Lnamespac_begin:145 .long 1212240712 @ Header Magic146 .short 1 @ Header Version147 .short 0 @ Header Hash Function148 .long 1 @ Header Bucket Count149 .long 0 @ Header Hash Count150 .long 12 @ Header Data Length151 .long 0 @ HeaderData Die Offset Base152 .long 1 @ HeaderData Atom Count153 .short 1 @ DW_ATOM_die_offset154 .short 6 @ DW_FORM_data4155 .long -1 @ Bucket 0156 .section __DWARF,__apple_types,regular,debug157Ltypes_begin:158 .long 1212240712 @ Header Magic159 .short 1 @ Header Version160 .short 0 @ Header Hash Function161 .long 1 @ Header Bucket Count162 .long 1 @ Header Hash Count163 .long 20 @ Header Data Length164 .long 0 @ HeaderData Die Offset Base165 .long 3 @ HeaderData Atom Count166 .short 1 @ DW_ATOM_die_offset167 .short 6 @ DW_FORM_data4168 .short 3 @ DW_ATOM_die_tag169 .short 5 @ DW_FORM_data2170 .short 4 @ DW_ATOM_type_flags171 .short 11 @ DW_FORM_data1172 .long 0 @ Bucket 0173 .long 193495088 @ Hash in Bucket 0174 .long Ltypes0-Ltypes_begin @ Offset in Bucket 0175Ltypes0:176 .long 56 @ int177 .long 1 @ Num DIEs178 .long 48179 .short 36180 .byte 0181 .long 0182 183.subsections_via_symbols184 .section __DWARF,__debug_line,regular,debug185Lsection_line:186Lline_table_start0:187