summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/nss/PKGBUILD11
-rw-r--r--core/nss/no-plt.diff48
2 files changed, 59 insertions, 0 deletions
diff --git a/core/nss/PKGBUILD b/core/nss/PKGBUILD
new file mode 100644
index 00000000..1a4dfa96
--- /dev/null
+++ b/core/nss/PKGBUILD
@@ -0,0 +1,11 @@
+# bring back changes of 617b84f70caf
+
+source+=(no-plt.diff)
+sha256sums+=('ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ /cd nss-/a patch -Np2 -i ../no-plt.diff
+ '
+)"
diff --git a/core/nss/no-plt.diff b/core/nss/no-plt.diff
new file mode 100644
index 00000000..9014f8b7
--- /dev/null
+++ b/core/nss/no-plt.diff
@@ -0,0 +1,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