From 13cc3c5a08376f70aab3fc56ed303a452efc5bcb Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 6 Nov 2020 17:52:09 +0100 Subject: core/nss: redone no-plt patch --- core/nss/PKGBUILD | 6 +++--- core/nss/no-plt.diff | 48 ------------------------------------------ core/nss/nss-3.58-no-plt.patch | 42 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 51 deletions(-) delete mode 100644 core/nss/no-plt.diff create mode 100644 core/nss/nss-3.58-no-plt.patch (limited to 'core/nss') diff --git a/core/nss/PKGBUILD b/core/nss/PKGBUILD index a82c4a3b..3b83d0c6 100644 --- a/core/nss/PKGBUILD +++ b/core/nss/PKGBUILD @@ -1,12 +1,12 @@ # bring back changes of 617b84f70caf -source+=(no-plt.diff) -sha256sums+=('ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa') +source+=(nss-3.58-no-plt.patch) +sha256sums+=('3d08665a7d693f495bd965e4f629cbf4671d4cf00567a391fd0b2e0e40153d57') eval "$( declare -f prepare | \ sed ' - /cd nss-/a patch -Np2 -i "$srcdir/no-plt.diff" + /cd nss-/a patch -Np2 -i "$srcdir/nss-3.58-no-plt.patch" ' )" diff --git a/core/nss/no-plt.diff b/core/nss/no-plt.diff deleted file mode 100644 index 9014f8b7..00000000 --- a/core/nss/no-plt.diff +++ /dev/null @@ -1,48 +0,0 @@ -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 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 -- cgit v1.2.3-70-g09d2