no-plt.diff 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. diff --git i/security/nss/lib/freebl/mpi/mpi_x86.s w/security/nss/lib/freebl/mpi/mpi_x86.s
  2. index 8f7e2130c3264754..b3ca1ce5b41b3771 100644
  3. --- i/security/nss/lib/freebl/mpi/mpi_x86.s
  4. +++ w/security/nss/lib/freebl/mpi/mpi_x86.s
  5. @@ -22,22 +22,41 @@ is_sse: .long -1
  6. #
  7. .ifndef NO_PIC
  8. .macro GET var,reg
  9. - movl \var@GOTOFF(%ebx),\reg
  10. + call thunk.ax
  11. + addl $_GLOBAL_OFFSET_TABLE_, %eax
  12. + movl \var@GOTOFF(%eax),\reg
  13. .endm
  14. .macro PUT reg,var
  15. - movl \reg,\var@GOTOFF(%ebx)
  16. + call thunk.dx
  17. + addl $_GLOBAL_OFFSET_TABLE_, %edx
  18. + movl \reg,\var@GOTOFF(%edx)
  19. .endm
  20. .else
  21. .macro GET var,reg
  22. movl \var,\reg
  23. .endm
  24. .macro PUT reg,var
  25. movl \reg,\var
  26. .endm
  27. .endif
  28. .text
  29. +.ifndef NO_PIC
  30. +.globl thunk.ax
  31. +.hidden thunk.ax
  32. +.type thunk.ax, @function
  33. +thunk.ax:
  34. + movl (%esp),%eax
  35. + ret
  36. +
  37. +.globl thunk.dx
  38. +.hidden thunk.dx
  39. +.type thunk.dx, @function
  40. +thunk.dx:
  41. + movl (%esp),%edx
  42. + ret
  43. +.endif
  44. # ebp - 36: caller's esi
  45. # ebp - 32: caller's edi