summaryrefslogtreecommitdiff
path: root/external/nss
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-08-12 19:48:00 +0300
committerTor Lillqvist <tml@collabora.com>2014-08-12 19:56:08 +0300
commitd87cf30fe65e525f1cb50dbc5eecf2d623e7cfb3 (patch)
tree7a1bef7985b7d3c05791e70fa8593dea2a1b17de /external/nss
parentf887a3e1d83b1607bb43c3d4957a2dc4c18b3d2c (diff)
More NSS static linking patches
I noticed in the debugger that this code tried to load a freebl dylib, but after then making it link to the freebl entry point statically, I no longer see it being entered. Huh, confusing. Making NSS work on iOS to the extent we need is a pain. Change-Id: Iafc3785752587c38566441f566e187859022733e
Diffstat (limited to 'external/nss')
-rw-r--r--external/nss/UnpackedTarball_nss.mk1
-rw-r--r--external/nss/nss-more-static.patch39
2 files changed, 40 insertions, 0 deletions
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index 0ca3de2af3f3..fa798d129c25 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/ubsan.patch.0 \
$(if $(filter IOS,$(OS)), \
external/nss/nss-chromium-nss-static.patch \
+ external/nss/nss-more-static.patch \
external/nss/nss-ios.patch) \
))
diff --git a/external/nss/nss-more-static.patch b/external/nss/nss-more-static.patch
new file mode 100644
index 000000000000..6b06a4e4a226
--- /dev/null
+++ b/external/nss/nss-more-static.patch
@@ -0,0 +1,39 @@
+--- a/a/nss/lib/freebl/loader.c
++++ a/a/nss/lib/freebl/loader.c
+@@ -114,6 +114,7 @@
+
+ #include "genload.c"
+
++extern FREEBLGetVectorFn FREEBL_GetVector;
+ /* This function must be run only once. */
+ /* determine if hybrid platform, then actually load the DSO. */
+ static PRStatus
+@@ -136,9 +136,9 @@
+ return PR_FAILURE;
+ }
+
+- handle = loader_LoadLibrary(name);
+- if (handle) {
+- PRFuncPtr address = PR_FindFunctionSymbol(handle, "FREEBL_GetVector");
++ handle = 0;
++ {
++ PRFuncPtr address = FREEBL_GetVector;
+ PRStatus status;
+ if (address) {
+ FREEBLGetVectorFn * getVector = (FREEBLGetVectorFn *)address;
+@@ -887,6 +887,7 @@
+ void
+ BL_Unload(void)
+ {
++#if 0
+ /* This function is not thread-safe, but doesn't need to be, because it is
+ * only called from functions that are also defined as not thread-safe,
+ * namely C_Finalize in softoken, and the SSL bypass shutdown callback called
+@@ -905,6 +905,7 @@
+ blLib = NULL;
+ }
+ loadFreeBLOnce = pristineCallOnce;
++#endif
+ }
+
+ /* ============== New for 3.003 =============================== */