Bug 611405 part 1 - Export jemalloc symbols when linking with the xpcom standalone glue. r=bsmedberg,a=clegnitto

This commit is contained in:
Mike Hommey 2010-11-17 09:56:19 +01:00
parent d46d58af0a
commit 76b69157c8
4 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,19 @@
{
global:
_malloc_postfork;
_malloc_prefork;
jemalloc_stats;
malloc_usable_size;
posix_memalign;
free;
realloc;
calloc;
malloc;
memalign;
valloc;
__free_hook;
__malloc_hook;
__realloc_hook;
__memalign_hook;
local: *;
};

View File

@ -196,6 +196,7 @@ RM = rm -f
MOZ_UI_LOCALE = @MOZ_UI_LOCALE@
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS = @MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS@
MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS = @MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS@
MOZ_COMPONENT_NSPR_LIBS=@MOZ_COMPONENT_NSPR_LIBS@
MOZ_FIX_LINK_PATHS=@MOZ_FIX_LINK_PATHS@

View File

@ -162,6 +162,11 @@ MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFF
ifdef MOZ_MEMORY
ifneq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
JEMALLOC_LIBS = $(MKSHLIB_FORCE_ALL) $(call EXPAND_MOZLIBNAME,jemalloc) $(MKSHLIB_UNFORCE_ALL)
# If we are linking jemalloc into a program, we want the jemalloc symbols
# to be exported
ifneq (,$(SIMPLE_PROGRAMS)$(PROGRAM))
JEMALLOC_LIBS += $(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
endif
endif
endif

View File

@ -2893,11 +2893,13 @@ esac
AC_SUBST(NO_LD_ARCHIVE_FLAGS)
dnl ========================================================
dnl = Flags to strip unused symbols from .so components
dnl = Flags to strip unused symbols from .so components and
dnl = to export jemalloc symbols when linking a program
dnl ========================================================
case "$target" in
*-linux*|*-kfreebsd*-gnu|*-gnu*)
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS='-rdynamic -Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/jemalloc-standalone-linkage-version-script'
;;
*-solaris*)
if test -z "$GNU_CC"; then
@ -8935,6 +8937,7 @@ AC_SUBST(PKG_SKIP_STRIP)
AC_SUBST(USE_ELF_DYNSTR_GC)
AC_SUBST(INCREMENTAL_LINKER)
AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
AC_SUBST(MOZ_JEMALLOC_STANDALONE_GLUE_LDOPTS)
AC_SUBST(MOZ_COMPONENT_NSPR_LIBS)
AC_SUBST(MOZ_FIX_LINK_PATHS)