1
/* Force .got aligned to 4K, so it very likely gets at 0x804a100
2
(0x60 bytes .tdata and 0xa0 bytes .dynamic) */
3
.section ".tdata", "awT", @progbits
5
.globl sg1, sg2, sg3, sg4, sg5, sg6, sg7, sg8
6
.globl sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
7
.hidden sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8
32
/* Force .text aligned to 4K, so it very likely gets at 0x8049000. */
44
addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
47
/* GD -> IE because variable is not defined in executable */
48
leal sG1@tlsdesc(%ebx), %eax
49
call *sG1@tlscall(%eax)
52
/* GD -> IE because variable is not defined in executable where
53
the variable is referenced through @gottpoff too */
54
leal sG2@tlsdesc(%ebx), %eax
55
call *sG2@tlscall(%eax)
58
/* GD -> IE because variable is not defined in executable where
59
the variable is referenced through @gotntpoff too */
60
leal sG3@tlsdesc(%ebx), %eax
61
call *sG3@tlscall(%eax)
64
/* GD -> IE because variable is not defined in executable where
65
the variable is referenced through @gottpoff and @gotntpoff too */
66
leal sG4@tlsdesc(%ebx), %eax
67
call *sG4@tlscall(%eax)
70
/* GD -> LE with global variable defined in executable */
71
leal sg1@tlsdesc(%ebx), %eax
72
call *sg1@tlscall(%eax)
75
/* GD -> LE with local variable defined in executable */
76
leal sl1@tlsdesc(%ebx), %eax
77
call *sl1@tlscall(%eax)
80
/* GD -> LE with hidden variable defined in executable */
81
leal sh1@tlsdesc(%ebx), %eax
82
call *sh1@tlscall(%eax)
86
leal _TLS_MODULE_BASE_@tlsdesc(%ebx), %eax
87
call *_TLS_MODULE_BASE_@tlscall(%eax)
89
leal sl1@dtpoff(%eax), %edx
91
leal sl2@dtpoff(%eax), %ecx
94
/* LD -> LE against hidden variables */
95
leal _TLS_MODULE_BASE_@tlsdesc(%ebx), %eax
96
call *_TLS_MODULE_BASE_@tlscall(%eax)
98
leal sh1@dtpoff(%eax), %edx
100
leal sh2@dtpoff(%eax), %ecx
103
/* @gottpoff IE against global var */
106
subl sG2@gottpoff(%ebx), %ecx
109
/* @gottpoff IE against global var */
112
subl sG4@gottpoff(%ebx), %eax
115
/* @gotntpoff IE against global var */
118
addl sG3@gotntpoff(%ebx), %ecx
121
/* @gotntpoff IE against global var */
124
addl sG4@gotntpoff(%ebx), %eax
127
/* @gottpoff IE -> LE against global var defined in exec */
130
subl sg1@gottpoff(%ebx), %ecx
133
/* @gotntpoff IE -> LE against local var */
136
addl sl1@gotntpoff(%ebx), %eax
139
/* @gottpoff IE -> LE against hidden var */
142
subl sh1@gottpoff(%ebx), %ecx
145
/* Direct access through %gs */
147
/* @gotntpoff IE against global var */
148
movl sG5@gotntpoff(%ebx), %ecx
150
movl %gs:(%ecx), %edx
153
/* @gotntpoff IE->LE against local var */
154
movl sl5@gotntpoff(%ebx), %eax
156
movl %gs:(%eax), %edx
159
/* @gotntpoff IE->LE against hidden var */
160
movl sh5@gotntpoff(%ebx), %edx
162
movl %gs:(%edx), %edx