summaryrefslogtreecommitdiff
path: root/core/nss/nss-3.58-no-plt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'core/nss/nss-3.58-no-plt.patch')
-rw-r--r--core/nss/nss-3.58-no-plt.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/core/nss/nss-3.58-no-plt.patch b/core/nss/nss-3.58-no-plt.patch
new file mode 100644
index 00000000..cd9183af
--- /dev/null
+++ b/core/nss/nss-3.58-no-plt.patch
@@ -0,0 +1,42 @@
+diff -rauN nss-3.58/nss/lib/freebl/mpi/mpi_x86.s nss-3.58-no-plt-patch/nss/lib/freebl/mpi/mpi_x86.s
+--- nss-3.58/nss/lib/freebl/mpi/mpi_x86.s 2020-10-16 16:50:49.000000000 +0200
++++ nss-3.58-no-plt-patch/nss/lib/freebl/mpi/mpi_x86.s 2020-11-06 17:46:18.822061734 +0100
+@@ -22,10 +22,14 @@
+ #
+ .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
+@@ -38,6 +42,21 @@
+
+ .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