summaryrefslogtreecommitdiffstats
path: root/memory/build/replace_malloc.c
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-23 00:26:22 -0500
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:53:27 +0200
commitec2daa8dc96bfc275b1d13a7ac880940f506f71e (patch)
tree401d750381d6cb45082d885a72f75c50e0c74ba5 /memory/build/replace_malloc.c
parent44c169c9be3cec6957d5b04272a3564cf9137109 (diff)
downloadUXP-ec2daa8dc96bfc275b1d13a7ac880940f506f71e.tar
UXP-ec2daa8dc96bfc275b1d13a7ac880940f506f71e.tar.gz
UXP-ec2daa8dc96bfc275b1d13a7ac880940f506f71e.tar.lz
UXP-ec2daa8dc96bfc275b1d13a7ac880940f506f71e.tar.xz
UXP-ec2daa8dc96bfc275b1d13a7ac880940f506f71e.zip
Issue #1053 - Remove android support from memory
Diffstat (limited to 'memory/build/replace_malloc.c')
-rw-r--r--memory/build/replace_malloc.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/memory/build/replace_malloc.c b/memory/build/replace_malloc.c
index f4c7eb878..91f86497c 100644
--- a/memory/build/replace_malloc.c
+++ b/memory/build/replace_malloc.c
@@ -24,14 +24,11 @@
* LD_PRELOAD or DYLD_INSERT_LIBRARIES on Linux/OSX. On this platform,
* the replacement functions are defined as variable pointers to the
* function resolved with GetProcAddress() instead of weak definitions
- * of functions. On Android, the same needs to happen as well, because
- * the Android linker doesn't handle weak linking with non LD_PRELOADed
- * libraries, but LD_PRELOADing is not very convenient on Android, with
- * the zygote.
+ * of functions.
*/
#ifdef XP_DARWIN
# define MOZ_REPLACE_WEAK __attribute__((weak_import))
-#elif defined(XP_WIN) || defined(MOZ_WIDGET_ANDROID)
+#elif defined(XP_WIN)
# define MOZ_NO_REPLACE_FUNC_DECL
#elif defined(__GNUC__)
# define MOZ_REPLACE_WEAK __attribute__((weak))
@@ -71,24 +68,6 @@ replace_malloc_init_funcs()
}
}
}
-# elif defined(MOZ_WIDGET_ANDROID)
-# include <dlfcn.h>
-# include <stdlib.h>
-static void
-replace_malloc_init_funcs()
-{
- const char *replace_malloc_lib = getenv("MOZ_REPLACE_MALLOC_LIB");
- if (replace_malloc_lib && *replace_malloc_lib) {
- void *handle = dlopen(replace_malloc_lib, RTLD_LAZY);
- if (handle) {
-#define MALLOC_DECL(name, ...) \
- replace_ ## name = (replace_ ## name ## _impl_t *) dlsym(handle, "replace_" # name);
-
-# define MALLOC_FUNCS MALLOC_FUNCS_ALL
-#include "malloc_decls.h"
- }
- }
-}
# else
# error No implementation for replace_malloc_init_funcs()
# endif