1 .macro bad args:vararg
2  .ifdef _bad_
3	\args
4  .endif
5 .endm
6
7 .macro ill args:vararg
8  # This is used to mark entries that aren't handled consistently,
9  # and thus shouldn't currently be checked for.
10  #	\args
11 .endm
12
13 .text
14_start:
15	movabs	$xtrn, %rax
16	add	$xtrn, %rax
17	mov	$xtrn, %eax
18	mov	$xtrn, %ax
19	mov	$xtrn, %al
20	mov	xtrn(%rbx), %eax
21	mov	xtrn(%ebx), %eax
22
23	movabs	$(xtrn - .), %rax
24	add	$(xtrn - .), %rax
25ill	mov	$(xtrn - .), %eax
26	mov	$(xtrn - .), %ax
27	mov	$(xtrn - .), %al
28	mov	xtrn(%rip), %eax
29bad	mov	xtrn(%eip), %eax
30	call	xtrn
31	jrcxz	xtrn
32
33	movabs	$xtrn@got, %rax
34	add	$xtrn@got, %rax
35bad	mov	$xtrn@got, %eax
36bad	mov	$xtrn@got, %ax
37bad	mov	$xtrn@got, %al
38	mov	xtrn@got(%rbx), %eax
39bad	mov	xtrn@got(%ebx), %eax
40bad	call	xtrn@got
41
42	movabs	$xtrn@gotoff, %rax
43bad	add	$xtrn@gotoff, %rax
44bad	mov	$xtrn@gotoff, %eax
45bad	mov	$xtrn@gotoff, %ax
46bad	mov	$xtrn@gotoff, %al
47bad	mov	xtrn@gotoff(%rbx), %eax
48bad	mov	xtrn@gotoff(%ebx), %eax
49bad	call	xtrn@gotoff
50
51bad	movabs	$xtrn@gotpcrel, %rax
52	add	$xtrn@gotpcrel, %rax
53bad	mov	$xtrn@gotpcrel, %eax
54bad	mov	$xtrn@gotpcrel, %ax
55bad	mov	$xtrn@gotpcrel, %al
56	mov	xtrn@gotpcrel(%rbx), %eax
57bad	mov	xtrn@gotpcrel(%ebx), %eax
58	call	xtrn@gotpcrel
59
60ill	movabs	$_GLOBAL_OFFSET_TABLE_, %rax
61	add	$_GLOBAL_OFFSET_TABLE_, %rax
62ill	add	$_GLOBAL_OFFSET_TABLE_, %eax
63ill	add	$_GLOBAL_OFFSET_TABLE_, %ax
64ill	add	$_GLOBAL_OFFSET_TABLE_, %al
65	lea	_GLOBAL_OFFSET_TABLE_(%rip), %rax #???
66bad	lea	_GLOBAL_OFFSET_TABLE_(%eip), %rax
67ill	movabs	$(_GLOBAL_OFFSET_TABLE_ - .), %rax
68	add	$(_GLOBAL_OFFSET_TABLE_ - .), %rax
69ill	add	$(_GLOBAL_OFFSET_TABLE_ - .), %eax
70ill	add	$(_GLOBAL_OFFSET_TABLE_ - .), %ax
71ill	add	$(_GLOBAL_OFFSET_TABLE_ - .), %al
72
73bad	movabs	$xtrn@plt, %rax
74	add	$xtrn@plt, %rax
75bad	mov	$xtrn@plt, %eax
76bad	mov	$xtrn@plt, %ax
77bad	mov	$xtrn@plt, %al
78	mov	xtrn@plt(%rbx), %eax
79bad	mov	xtrn@plt(%ebx), %eax
80	call	xtrn@plt
81bad	jrcxz	xtrn@plt
82
83bad	movabs	$xtrn@tlsgd, %rax
84	add	$xtrn@tlsgd, %rax
85bad	mov	$xtrn@tlsgd, %eax
86bad	mov	$xtrn@tlsgd, %ax
87bad	mov	$xtrn@tlsgd, %al
88	mov	xtrn@tlsgd(%rbx), %eax
89bad	mov	xtrn@tlsgd(%ebx), %eax
90	call	xtrn@tlsgd
91
92bad	movabs	$xtrn@gottpoff, %rax
93	add	$xtrn@gottpoff, %rax
94bad	mov	$xtrn@gottpoff, %eax
95bad	mov	$xtrn@gottpoff, %ax
96bad	mov	$xtrn@gottpoff, %al
97	mov	xtrn@gottpoff(%rbx), %eax
98bad	mov	xtrn@gottpoff(%ebx), %eax
99	call	xtrn@gottpoff
100
101bad	movabs	$xtrn@tlsld, %rax
102	add	$xtrn@tlsld, %rax
103bad	mov	$xtrn@tlsld, %eax
104bad	mov	$xtrn@tlsld, %ax
105bad	mov	$xtrn@tlsld, %al
106	mov	xtrn@tlsld(%rbx), %eax
107bad	mov	xtrn@tlsld(%ebx), %eax
108	call	xtrn@tlsld
109
110	movabs	$xtrn@dtpoff, %rax
111	add	$xtrn@dtpoff, %rax
112bad	mov	$xtrn@dtpoff, %eax
113bad	mov	$xtrn@dtpoff, %ax
114bad	mov	$xtrn@dtpoff, %al
115	mov	xtrn@dtpoff(%rbx), %eax
116bad	mov	xtrn@dtpoff(%ebx), %eax
117bad	call	xtrn@dtpoff
118
119	movabs	$xtrn@tpoff, %rax
120	add	$xtrn@tpoff, %rax
121bad	mov	$xtrn@tpoff, %eax
122bad	mov	$xtrn@tpoff, %ax
123bad	mov	$xtrn@tpoff, %al
124	mov	xtrn@tpoff(%rbx), %eax
125bad	mov	xtrn@tpoff(%ebx), %eax
126bad	call	xtrn@tpoff
127
128 .data
129	.quad	xtrn
130	.quad	xtrn - .
131	.quad	xtrn@got
132	.quad	xtrn@gotoff
133	.quad	xtrn@gotpcrel
134ill	.quad	_GLOBAL_OFFSET_TABLE_
135ill	.quad	_GLOBAL_OFFSET_TABLE_ - .
136bad	.quad	xtrn@plt
137bad	.quad	xtrn@tlsgd
138bad	.quad	xtrn@gottpoff
139bad	.quad	xtrn@tlsld
140	.quad	xtrn@dtpoff
141	.quad	xtrn@tpoff
142
143	.long	xtrn
144	.long	xtrn - .
145	.long	xtrn@got
146bad	.long	xtrn@gotoff
147	.long	xtrn@gotpcrel
148	.long	_GLOBAL_OFFSET_TABLE_
149	.long	_GLOBAL_OFFSET_TABLE_ - .
150	.long	xtrn@plt
151	.long	xtrn@tlsgd
152	.long	xtrn@gottpoff
153	.long	xtrn@tlsld
154	.long	xtrn@dtpoff
155	.long	xtrn@tpoff
156
157	.slong	xtrn
158	.slong	xtrn - .
159	.slong	xtrn@got
160bad	.slong	xtrn@gotoff
161	.slong	xtrn@gotpcrel
162	.slong	_GLOBAL_OFFSET_TABLE_
163	.slong	_GLOBAL_OFFSET_TABLE_ - .
164	.slong	xtrn@plt
165	.slong	xtrn@tlsgd
166	.slong	xtrn@gottpoff
167	.slong	xtrn@tlsld
168	.slong	xtrn@dtpoff
169	.slong	xtrn@tpoff
170
171	.word	xtrn
172	.word	xtrn - .
173bad	.word	xtrn@got
174bad	.word	xtrn@gotoff
175bad	.word	xtrn@gotpcrel
176ill	.word	_GLOBAL_OFFSET_TABLE_
177ill	.word	_GLOBAL_OFFSET_TABLE_ - .
178bad	.word	xtrn@plt
179bad	.word	xtrn@tlsgd
180bad	.word	xtrn@gottpoff
181bad	.word	xtrn@tlsld
182bad	.word	xtrn@dtpoff
183bad	.word	xtrn@tpoff
184
185	.byte	xtrn
186	.byte	xtrn - .
187bad	.byte	xtrn@got
188bad	.byte	xtrn@gotoff
189bad	.byte	xtrn@gotpcrel
190ill	.byte	_GLOBAL_OFFSET_TABLE_
191ill	.byte	_GLOBAL_OFFSET_TABLE_ - .
192bad	.byte	xtrn@plt
193bad	.byte	xtrn@tlsgd
194bad	.byte	xtrn@gottpoff
195bad	.byte	xtrn@tlsld
196bad	.byte	xtrn@dtpoff
197bad	.byte	xtrn@tpoff
198