• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.c
5# $ clang -c -o 1.o scattered.s
6#
7# Then I edited the debug info bellow to change the DW_AT_location of the bar
8# variable from '.long _bar' to '.long _bar + 16' in order to generate a
9# scattered reloc (I do not think LLVM will generate scattered relocs in
10# debug info by itself).
11
12	.section	__TEXT,__text,regular,pure_instructions
13	.ios_version_min 5, 0
14	.syntax unified
15	.file	1 "scattered.c"
16	.section	__DATA,__data
17	.globl	_bar                    @ @bar
18	.p2align	2
19_bar:
20	.long	42                      @ 0x2a
21
22	.section	__DWARF,__debug_str,regular,debug
23Linfo_string:
24	.asciz	"clang version 3.9.0 (trunk 259311)" @ string offset=0
25	.asciz	"scattered.c"           @ string offset=35
26	.asciz	"/tmp"                  @ string offset=47
27	.asciz	"bar"                   @ string offset=52
28	.asciz	"int"                   @ string offset=56
29	.section	__DWARF,__debug_loc,regular,debug
30Lsection_debug_loc:
31	.section	__DWARF,__debug_abbrev,regular,debug
32Lsection_abbrev:
33	.byte	1                       @ Abbreviation Code
34	.byte	17                      @ DW_TAG_compile_unit
35	.byte	1                       @ DW_CHILDREN_yes
36	.byte	37                      @ DW_AT_producer
37	.byte	14                      @ DW_FORM_strp
38	.byte	19                      @ DW_AT_language
39	.byte	5                       @ DW_FORM_data2
40	.byte	3                       @ DW_AT_name
41	.byte	14                      @ DW_FORM_strp
42	.byte	16                      @ DW_AT_stmt_list
43	.byte	6                       @ DW_FORM_data4
44	.byte	27                      @ DW_AT_comp_dir
45	.byte	14                      @ DW_FORM_strp
46	.byte	0                       @ EOM(1)
47	.byte	0                       @ EOM(2)
48	.byte	2                       @ Abbreviation Code
49	.byte	52                      @ DW_TAG_variable
50	.byte	0                       @ DW_CHILDREN_no
51	.byte	3                       @ DW_AT_name
52	.byte	14                      @ DW_FORM_strp
53	.byte	73                      @ DW_AT_type
54	.byte	19                      @ DW_FORM_ref4
55	.byte	63                      @ DW_AT_external
56	.byte	12                      @ DW_FORM_flag
57	.byte	58                      @ DW_AT_decl_file
58	.byte	11                      @ DW_FORM_data1
59	.byte	59                      @ DW_AT_decl_line
60	.byte	11                      @ DW_FORM_data1
61	.byte	2                       @ DW_AT_location
62	.byte	10                      @ DW_FORM_block1
63	.byte	0                       @ EOM(1)
64	.byte	0                       @ EOM(2)
65	.byte	3                       @ Abbreviation Code
66	.byte	36                      @ DW_TAG_base_type
67	.byte	0                       @ DW_CHILDREN_no
68	.byte	3                       @ DW_AT_name
69	.byte	14                      @ DW_FORM_strp
70	.byte	62                      @ DW_AT_encoding
71	.byte	11                      @ DW_FORM_data1
72	.byte	11                      @ DW_AT_byte_size
73	.byte	11                      @ DW_FORM_data1
74	.byte	0                       @ EOM(1)
75	.byte	0                       @ EOM(2)
76	.byte	0                       @ EOM(3)
77	.section	__DWARF,__debug_info,regular,debug
78Lsection_info:
79Lcu_begin0:
80	.long	52                      @ Length of Unit
81	.short	2                       @ DWARF version number
82Lset0 = Lsection_abbrev-Lsection_abbrev @ Offset Into Abbrev. Section
83	.long	Lset0
84	.byte	4                       @ Address Size (in bytes)
85	.byte	1                       @ Abbrev [1] 0xb:0x2d DW_TAG_compile_unit
86	.long	0                       @ DW_AT_producer
87	.short	12                      @ DW_AT_language
88	.long	35                      @ DW_AT_name
89Lset1 = Lline_table_start0-Lsection_line @ DW_AT_stmt_list
90	.long	Lset1
91	.long	47                      @ DW_AT_comp_dir
92	.byte	2                       @ Abbrev [2] 0x1e:0x12 DW_TAG_variable
93	.long	52                      @ DW_AT_name
94	.long	48                      @ DW_AT_type
95	.byte	1                       @ DW_AT_external
96	.byte	1                       @ DW_AT_decl_file
97	.byte	1                       @ DW_AT_decl_line
98	.byte	5                       @ DW_AT_location
99	.byte	3
100	.long	_bar + 16
101	.byte	3                       @ Abbrev [3] 0x30:0x7 DW_TAG_base_type
102	.long	56                      @ DW_AT_name
103	.byte	5                       @ DW_AT_encoding
104	.byte	4                       @ DW_AT_byte_size
105	.byte	0                       @ End Of Children Mark
106	.section	__DWARF,__debug_ranges,regular,debug
107Ldebug_range:
108	.section	__DWARF,__debug_macinfo,regular,debug
109	.byte	0                       @ End Of Macro List Mark
110	.section	__DWARF,__apple_names,regular,debug
111Lnames_begin:
112	.long	1212240712              @ Header Magic
113	.short	1                       @ Header Version
114	.short	0                       @ Header Hash Function
115	.long	1                       @ Header Bucket Count
116	.long	1                       @ Header Hash Count
117	.long	12                      @ Header Data Length
118	.long	0                       @ HeaderData Die Offset Base
119	.long	1                       @ HeaderData Atom Count
120	.short	1                       @ DW_ATOM_die_offset
121	.short	6                       @ DW_FORM_data4
122	.long	0                       @ Bucket 0
123	.long	193487034               @ Hash in Bucket 0
124	.long	LNames0-Lnames_begin    @ Offset in Bucket 0
125LNames0:
126	.long	52                      @ bar
127	.long	1                       @ Num DIEs
128	.long	30
129	.long	0
130	.section	__DWARF,__apple_objc,regular,debug
131Lobjc_begin:
132	.long	1212240712              @ Header Magic
133	.short	1                       @ Header Version
134	.short	0                       @ Header Hash Function
135	.long	1                       @ Header Bucket Count
136	.long	0                       @ Header Hash Count
137	.long	12                      @ Header Data Length
138	.long	0                       @ HeaderData Die Offset Base
139	.long	1                       @ HeaderData Atom Count
140	.short	1                       @ DW_ATOM_die_offset
141	.short	6                       @ DW_FORM_data4
142	.long	-1                      @ Bucket 0
143	.section	__DWARF,__apple_namespac,regular,debug
144Lnamespac_begin:
145	.long	1212240712              @ Header Magic
146	.short	1                       @ Header Version
147	.short	0                       @ Header Hash Function
148	.long	1                       @ Header Bucket Count
149	.long	0                       @ Header Hash Count
150	.long	12                      @ Header Data Length
151	.long	0                       @ HeaderData Die Offset Base
152	.long	1                       @ HeaderData Atom Count
153	.short	1                       @ DW_ATOM_die_offset
154	.short	6                       @ DW_FORM_data4
155	.long	-1                      @ Bucket 0
156	.section	__DWARF,__apple_types,regular,debug
157Ltypes_begin:
158	.long	1212240712              @ Header Magic
159	.short	1                       @ Header Version
160	.short	0                       @ Header Hash Function
161	.long	1                       @ Header Bucket Count
162	.long	1                       @ Header Hash Count
163	.long	20                      @ Header Data Length
164	.long	0                       @ HeaderData Die Offset Base
165	.long	3                       @ HeaderData Atom Count
166	.short	1                       @ DW_ATOM_die_offset
167	.short	6                       @ DW_FORM_data4
168	.short	3                       @ DW_ATOM_die_tag
169	.short	5                       @ DW_FORM_data2
170	.short	4                       @ DW_ATOM_type_flags
171	.short	11                      @ DW_FORM_data1
172	.long	0                       @ Bucket 0
173	.long	193495088               @ Hash in Bucket 0
174	.long	Ltypes0-Ltypes_begin    @ Offset in Bucket 0
175Ltypes0:
176	.long	56                      @ int
177	.long	1                       @ Num DIEs
178	.long	48
179	.short	36
180	.byte	0
181	.long	0
182
183.subsections_via_symbols
184	.section	__DWARF,__debug_line,regular,debug
185Lsection_line:
186Lline_table_start0:
187