File: reloc32.s

package info (click to toggle)
binutils 2.31.1-16
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 309,412 kB
  • sloc: ansic: 1,161,194; asm: 638,508; cpp: 128,829; exp: 68,580; makefile: 55,828; sh: 22,360; yacc: 14,238; lisp: 13,272; perl: 2,111; ada: 1,681; lex: 1,652; pascal: 1,446; cs: 879; sed: 195; python: 154; xml: 95; awk: 25
file content (163 lines) | stat: -rw-r--r-- 3,481 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
 .macro bad args:vararg
  .ifdef _bad_
	\args
  .endif
 .endm

 .macro ill args:vararg
  # This is used to mark entries that aren't handled consistently,
  # and thus shouldn't currently be checked for.
  #	\args
 .endm

 .text
_start:
	mov	$xtrn, %eax
	mov	$xtrn, %ax
	mov	$xtrn, %al
	mov	xtrn(%ebx), %eax
	mov	xtrn(%bx), %eax

	mov	$(xtrn - .), %eax
	mov	$(xtrn - .), %ax
	mov	$(xtrn - .), %al
	mov	xtrn - .(%ebx), %eax
	mov	xtrn - .(%bx), %eax
	call	xtrn
	jecxz	xtrn

	mov	$xtrn@got, %eax
bad	mov	$xtrn@got, %ax
bad	mov	$xtrn@got, %al
	mov	xtrn@got(%ebx), %eax
bad	mov	xtrn@got(%bx), %eax
bad	call	xtrn@got

	mov	$xtrn@gotoff, %eax
bad	mov	$xtrn@gotoff, %ax
bad	mov	$xtrn@gotoff, %al
	mov	xtrn@gotoff(%ebx), %eax
bad	mov	xtrn@gotoff(%bx), %eax
bad	call	xtrn@gotoff

	add	$_GLOBAL_OFFSET_TABLE_, %eax
ill	add	$_GLOBAL_OFFSET_TABLE_, %ax
ill	add	$_GLOBAL_OFFSET_TABLE_, %al
	add	$(_GLOBAL_OFFSET_TABLE_ - .), %eax
ill	add	$(_GLOBAL_OFFSET_TABLE_ - .), %ax
ill	add	$(_GLOBAL_OFFSET_TABLE_ - .), %al

	mov	$xtrn@plt, %eax
bad	mov	$xtrn@plt, %ax
bad	mov	$xtrn@plt, %al
	mov	xtrn@plt(%ebx), %eax
bad	mov	xtrn@plt(%bx), %eax
	call	xtrn@plt
bad	jecxz	xtrn@plt

	mov	$xtrn@tlsgd, %eax
bad	mov	$xtrn@tlsgd, %ax
bad	mov	$xtrn@tlsgd, %al
	mov	xtrn@tlsgd(%ebx), %eax
bad	mov	xtrn@tlsgd(%bx), %eax
bad	call	xtrn@tlsgd

	mov	$xtrn@gotntpoff, %eax
bad	mov	$xtrn@gotntpoff, %ax
bad	mov	$xtrn@gotntpoff, %al
	mov	xtrn@gotntpoff(%ebx), %eax
bad	mov	xtrn@gotntpoff(%bx), %eax
bad	call	xtrn@gotntpoff

	mov	$xtrn@indntpoff, %eax
bad	mov	$xtrn@indntpoff, %ax
bad	mov	$xtrn@indntpoff, %al
	mov	xtrn@indntpoff(%ebx), %eax
bad	mov	xtrn@indntpoff(%bx), %eax
bad	call	xtrn@indntpoff

	mov	$xtrn@gottpoff, %eax
bad	mov	$xtrn@gottpoff, %ax
bad	mov	$xtrn@gottpoff, %al
	mov	xtrn@gottpoff(%ebx), %eax
bad	mov	xtrn@gottpoff(%bx), %eax
bad	call	xtrn@gottpoff

	mov	$xtrn@tlsldm, %eax
bad	mov	$xtrn@tlsldm, %ax
bad	mov	$xtrn@tlsldm, %al
	mov	xtrn@tlsldm(%ebx), %eax
bad	mov	xtrn@tlsldm(%bx), %eax
bad	call	xtrn@tlsldm

	mov	$xtrn@dtpoff, %eax
bad	mov	$xtrn@dtpoff, %ax
bad	mov	$xtrn@dtpoff, %al
	mov	xtrn@dtpoff(%ebx), %eax
bad	mov	xtrn@dtpoff(%bx), %eax
bad	call	xtrn@dtpoff

	mov	$xtrn@ntpoff, %eax
bad	mov	$xtrn@ntpoff, %ax
bad	mov	$xtrn@ntpoff, %al
	mov	xtrn@ntpoff(%ebx), %eax
bad	mov	xtrn@ntpoff(%bx), %eax
bad	call	xtrn@ntpoff

	mov	$xtrn@tpoff, %eax
bad	mov	$xtrn@tpoff, %ax
bad	mov	$xtrn@tpoff, %al
	mov	xtrn@tpoff(%ebx), %eax
bad	mov	xtrn@tpoff(%bx), %eax
bad	call	xtrn@tpoff

 .data
	.long	xtrn
	.long	xtrn - .
	.long	xtrn@got
	.long	xtrn@gotoff
	.long	_GLOBAL_OFFSET_TABLE_
	.long	_GLOBAL_OFFSET_TABLE_ - .
	.long	xtrn@plt
	.long	xtrn@tlsgd
	.long	xtrn@gotntpoff
	.long	xtrn@indntpoff
	.long	xtrn@gottpoff
	.long	xtrn@tlsldm
	.long	xtrn@dtpoff
	.long	xtrn@ntpoff
	.long	xtrn@tpoff
	
	.word	xtrn
	.word	xtrn - .
bad	.word	xtrn@got
bad	.word	xtrn@gotoff
ill	.word	_GLOBAL_OFFSET_TABLE_
ill	.word	_GLOBAL_OFFSET_TABLE_ - .
bad	.word	xtrn@plt
bad	.word	xtrn@tlsgd
bad	.word	xtrn@gotntpoff
bad	.word	xtrn@indntpoff
bad	.word	xtrn@gottpoff
bad	.word	xtrn@tlsldm
bad	.word	xtrn@dtpoff
bad	.word	xtrn@ntpoff
bad	.word	xtrn@tpoff

	.byte	xtrn
	.byte	xtrn - .
bad	.byte	xtrn@got
bad	.byte	xtrn@gotoff
ill	.byte	_GLOBAL_OFFSET_TABLE_
ill	.byte	_GLOBAL_OFFSET_TABLE_ - .
bad	.byte	xtrn@plt
bad	.byte	xtrn@tlsgd
bad	.byte	xtrn@gotntpoff
bad	.byte	xtrn@indntpoff
bad	.byte	xtrn@gottpoff
bad	.byte	xtrn@tlsldm
bad	.byte	xtrn@dtpoff
bad	.byte	xtrn@ntpoff
bad	.byte	xtrn@tpoff
	.long	xtrn@got + 4
	.long	xtrn@got - 4