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
|
diff --git i/security/nss/lib/freebl/mpi/mpi_x86.s w/security/nss/lib/freebl/mpi/mpi_x86.s
index 8f7e2130c3264754..b3ca1ce5b41b3771 100644
--- i/security/nss/lib/freebl/mpi/mpi_x86.s
+++ w/security/nss/lib/freebl/mpi/mpi_x86.s
@@ -22,22 +22,41 @@ is_sse: .long -1
#
.ifndef NO_PIC
.macro GET var,reg
- movl \var@GOTOFF(%ebx),\reg
+ call thunk.ax
+ addl $_GLOBAL_OFFSET_TABLE_, %eax
+ movl \var@GOTOFF(%eax),\reg
.endm
.macro PUT reg,var
- movl \reg,\var@GOTOFF(%ebx)
+ call thunk.dx
+ addl $_GLOBAL_OFFSET_TABLE_, %edx
+ movl \reg,\var@GOTOFF(%edx)
.endm
.else
.macro GET var,reg
movl \var,\reg
.endm
.macro PUT reg,var
movl \reg,\var
.endm
.endif
.text
+.ifndef NO_PIC
+.globl thunk.ax
+.hidden thunk.ax
+.type thunk.ax, @function
+thunk.ax:
+ movl (%esp),%eax
+ ret
+
+.globl thunk.dx
+.hidden thunk.dx
+.type thunk.dx, @function
+thunk.dx:
+ movl (%esp),%edx
+ ret
+.endif
# ebp - 36: caller's esi
# ebp - 32: caller's edi
|