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	mov	$xtrn, %eax
16	mov	$xtrn, %ax
17	mov	$xtrn, %al
18	mov	xtrn(%ebx), %eax
19	mov	xtrn(%bx), %eax
20
21	mov	$(xtrn - .), %eax
22	mov	$(xtrn - .), %ax
23	mov	$(xtrn - .), %al
24	mov	xtrn - .(%ebx), %eax
25	mov	xtrn - .(%bx), %eax
26	call	xtrn
27	jecxz	xtrn
28
29	mov	$xtrn@got, %eax
30bad	mov	$xtrn@got, %ax
31bad	mov	$xtrn@got, %al
32	mov	xtrn@got(%ebx), %eax
33bad	mov	xtrn@got(%bx), %eax
34bad	call	xtrn@got
35
36	mov	$xtrn@gotoff, %eax
37bad	mov	$xtrn@gotoff, %ax
38bad	mov	$xtrn@gotoff, %al
39	mov	xtrn@gotoff(%ebx), %eax
40bad	mov	xtrn@gotoff(%bx), %eax
41bad	call	xtrn@gotoff
42
43	add	$_GLOBAL_OFFSET_TABLE_, %eax
44ill	add	$_GLOBAL_OFFSET_TABLE_, %ax
45ill	add	$_GLOBAL_OFFSET_TABLE_, %al
46	add	$(_GLOBAL_OFFSET_TABLE_ - .), %eax
47ill	add	$(_GLOBAL_OFFSET_TABLE_ - .), %ax
48ill	add	$(_GLOBAL_OFFSET_TABLE_ - .), %al
49
50	mov	$xtrn@plt, %eax
51bad	mov	$xtrn@plt, %ax
52bad	mov	$xtrn@plt, %al
53	mov	xtrn@plt(%ebx), %eax
54bad	mov	xtrn@plt(%bx), %eax
55	call	xtrn@plt
56bad	jecxz	xtrn@plt
57
58	mov	$xtrn@tlsgd, %eax
59bad	mov	$xtrn@tlsgd, %ax
60bad	mov	$xtrn@tlsgd, %al
61	mov	xtrn@tlsgd(%ebx), %eax
62bad	mov	xtrn@tlsgd(%bx), %eax
63bad	call	xtrn@tlsgd
64
65	mov	$xtrn@gotntpoff, %eax
66bad	mov	$xtrn@gotntpoff, %ax
67bad	mov	$xtrn@gotntpoff, %al
68	mov	xtrn@gotntpoff(%ebx), %eax
69bad	mov	xtrn@gotntpoff(%bx), %eax
70bad	call	xtrn@gotntpoff
71
72	mov	$xtrn@indntpoff, %eax
73bad	mov	$xtrn@indntpoff, %ax
74bad	mov	$xtrn@indntpoff, %al
75	mov	xtrn@indntpoff(%ebx), %eax
76bad	mov	xtrn@indntpoff(%bx), %eax
77bad	call	xtrn@indntpoff
78
79	mov	$xtrn@gottpoff, %eax
80bad	mov	$xtrn@gottpoff, %ax
81bad	mov	$xtrn@gottpoff, %al
82	mov	xtrn@gottpoff(%ebx), %eax
83bad	mov	xtrn@gottpoff(%bx), %eax
84bad	call	xtrn@gottpoff
85
86	mov	$xtrn@tlsldm, %eax
87bad	mov	$xtrn@tlsldm, %ax
88bad	mov	$xtrn@tlsldm, %al
89	mov	xtrn@tlsldm(%ebx), %eax
90bad	mov	xtrn@tlsldm(%bx), %eax
91bad	call	xtrn@tlsldm
92
93	mov	$xtrn@dtpoff, %eax
94bad	mov	$xtrn@dtpoff, %ax
95bad	mov	$xtrn@dtpoff, %al
96	mov	xtrn@dtpoff(%ebx), %eax
97bad	mov	xtrn@dtpoff(%bx), %eax
98bad	call	xtrn@dtpoff
99
100	mov	$xtrn@ntpoff, %eax
101bad	mov	$xtrn@ntpoff, %ax
102bad	mov	$xtrn@ntpoff, %al
103	mov	xtrn@ntpoff(%ebx), %eax
104bad	mov	xtrn@ntpoff(%bx), %eax
105bad	call	xtrn@ntpoff
106
107	mov	$xtrn@tpoff, %eax
108bad	mov	$xtrn@tpoff, %ax
109bad	mov	$xtrn@tpoff, %al
110	mov	xtrn@tpoff(%ebx), %eax
111bad	mov	xtrn@tpoff(%bx), %eax
112bad	call	xtrn@tpoff
113
114 .data
115	.long	xtrn
116	.long	xtrn - .
117	.long	xtrn@got
118	.long	xtrn@gotoff
119	.long	_GLOBAL_OFFSET_TABLE_
120	.long	_GLOBAL_OFFSET_TABLE_ - .
121	.long	xtrn@plt
122	.long	xtrn@tlsgd
123	.long	xtrn@gotntpoff
124	.long	xtrn@indntpoff
125	.long	xtrn@gottpoff
126	.long	xtrn@tlsldm
127	.long	xtrn@dtpoff
128	.long	xtrn@ntpoff
129	.long	xtrn@tpoff
130
131	.word	xtrn
132	.word	xtrn - .
133bad	.word	xtrn@got
134bad	.word	xtrn@gotoff
135ill	.word	_GLOBAL_OFFSET_TABLE_
136ill	.word	_GLOBAL_OFFSET_TABLE_ - .
137bad	.word	xtrn@plt
138bad	.word	xtrn@tlsgd
139bad	.word	xtrn@gotntpoff
140bad	.word	xtrn@indntpoff
141bad	.word	xtrn@gottpoff
142bad	.word	xtrn@tlsldm
143bad	.word	xtrn@dtpoff
144bad	.word	xtrn@ntpoff
145bad	.word	xtrn@tpoff
146
147	.byte	xtrn
148	.byte	xtrn - .
149bad	.byte	xtrn@got
150bad	.byte	xtrn@gotoff
151ill	.byte	_GLOBAL_OFFSET_TABLE_
152ill	.byte	_GLOBAL_OFFSET_TABLE_ - .
153bad	.byte	xtrn@plt
154bad	.byte	xtrn@tlsgd
155bad	.byte	xtrn@gotntpoff
156bad	.byte	xtrn@indntpoff
157bad	.byte	xtrn@gottpoff
158bad	.byte	xtrn@tlsldm
159bad	.byte	xtrn@dtpoff
160bad	.byte	xtrn@ntpoff
161bad	.byte	xtrn@tpoff
162	.long	xtrn@got + 4
163	.long	xtrn@got - 4
164bad	.long	xtrn@plt - .
165