From 440ff6db128fa687b8b4c4d74a705d861206c2c4 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 12 Feb 2004 22:54:00 +0000 Subject: [PATCH] Added version scripts for libwine and libwine_unicode. --- configure | 63 +++++++++++++++++++++++++++++++ configure.ac | 10 +++++ libs/Makelib.rules.in | 2 +- libs/unicode/Makefile.in | 1 + libs/unicode/wine_unicode.map | 29 ++++++++++++++ libs/wine/Makefile.in | 1 + libs/wine/wine.map | 71 +++++++++++++++++++++++++++++++++++ 7 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 libs/unicode/wine_unicode.map create mode 100644 libs/wine/wine.map diff --git a/configure b/configure index c8dd0d15a65..b006c7fe9df 100755 --- a/configure +++ b/configure @@ -13670,6 +13670,69 @@ _ACEOF LDDLL="$LDDLL,-init,__wine_spec_init,-fini,__wine_spec_fini" fi + echo "$as_me:$LINENO: checking whether the linker accepts version scripts" >&5 +echo $ECHO_N "checking whether the linker accepts version scripts... $ECHO_C" >&6 +if test "${ac_cv_c_ld_version_scripts+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + echo '{ global: *; };' >conftest.map + ac_wine_try_cflags_saved=$CFLAGS +CFLAGS="$CFLAGS -fPIC -shared -Wl,--version-script=conftest.map" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_ld_version_scripts="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_ld_version_scripts="no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CFLAGS=$ac_wine_try_cflags_saved + rm -f conftest.map +fi +echo "$as_me:$LINENO: result: $ac_cv_c_ld_version_scripts" >&5 +echo "${ECHO_T}$ac_cv_c_ld_version_scripts" >&6 + if test "$ac_cv_c_ld_version_scripts" = "yes" + then + LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)" + fi + echo "$as_me:$LINENO: checking whether the linker accepts --export-dynamic" >&5 echo $ECHO_N "checking whether the linker accepts --export-dynamic... $ECHO_C" >&6 if test "${ac_cv_c_export_dynamic+set}" = set; then diff --git a/configure.ac b/configure.ac index c160dd924c1..c0f38e21f1a 100644 --- a/configure.ac +++ b/configure.ac @@ -869,6 +869,16 @@ case $host_os in LDDLL="$LDDLL,-init,__wine_spec_init,-fini,__wine_spec_fini" fi + AC_CACHE_CHECK([whether the linker accepts version scripts], ac_cv_c_ld_version_scripts, + [echo '{ global: *; };' >conftest.map + WINE_TRY_CFLAGS([-fPIC -shared -Wl,--version-script=conftest.map], + ac_cv_c_ld_version_scripts="yes",ac_cv_c_ld_version_scripts="no") + rm -f conftest.map]) + if test "$ac_cv_c_ld_version_scripts" = "yes" + then + LDSHARED="$LDSHARED \$(VERSCRIPT:%=-Wl,--version-script=%)" + fi + AC_CACHE_CHECK([whether the linker accepts --export-dynamic], ac_cv_c_export_dynamic, [WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic], ac_cv_c_export_dynamic="yes",ac_cv_c_export_dynamic="no")]) diff --git a/libs/Makelib.rules.in b/libs/Makelib.rules.in index 1ab497b5554..c0bc1c2485c 100644 --- a/libs/Makelib.rules.in +++ b/libs/Makelib.rules.in @@ -19,7 +19,7 @@ all: $(MODULE) $(MODULE:.dll=.a) @MAKE_RULES@ -$(LIBNAME).so.$(SOVERSION): $(OBJS) Makefile.in +$(LIBNAME).so.$(SOVERSION): $(OBJS) $(VERSCRIPT) Makefile.in $(LDSHARED) $(OBJS) $(EXTRALIBS) $(LDFLAGS) $(LIBS) -o $@ $(LIBNAME).so: $(LIBNAME).so.$(SOVERSION) diff --git a/libs/unicode/Makefile.in b/libs/unicode/Makefile.in index 3868f03625c..3013d5efad8 100644 --- a/libs/unicode/Makefile.in +++ b/libs/unicode/Makefile.in @@ -4,6 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ LIBRARY = wine_unicode SOVERSION = 1 +VERSCRIPT = $(SRCDIR)/wine_unicode.map EXTRADEFS = -D__WINESRC__ -DNO_LIBWINE_PORT -DWINE_UNICODE_API="" CODEPAGES = \ diff --git a/libs/unicode/wine_unicode.map b/libs/unicode/wine_unicode.map new file mode 100644 index 00000000000..88e27981b7e --- /dev/null +++ b/libs/unicode/wine_unicode.map @@ -0,0 +1,29 @@ +WINE_1.0 +{ + global: + snprintfW; + sprintfW; + strcmpiW; + strncmpiW; + strstrW; + strtolW; + strtoulW; + vsnprintfW; + vsprintfW; + wine_casemap_lower; + wine_casemap_upper; + wine_compare_string; + wine_cp_enum_table; + wine_cp_get_table; + wine_cp_mbstowcs; + wine_cp_wcstombs; + wine_cpsymbol_mbstowcs; + wine_cpsymbol_wcstombs; + wine_fold_string; + wine_get_sortkey; + wine_utf8_mbstowcs; + wine_utf8_wcstombs; + wine_wctype_table; + + local: *; +}; diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index 4265ae3efa9..5a5e9b1766a 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -4,6 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ LIBRARY = wine SOVERSION = 1 +VERSCRIPT = $(SRCDIR)/wine.map EXTRADEFS = -D__WINESRC__ -DBINDIR="\"$(bindir)\"" -DDLLDIR="\"$(dlldir)\"" EXTRALIBS = $(LIBPORT) @DLLIBS@ @CRTLIBS@ diff --git a/libs/wine/wine.map b/libs/wine/wine.map new file mode 100644 index 00000000000..5f39d7bd472 --- /dev/null +++ b/libs/wine/wine.map @@ -0,0 +1,71 @@ +WINE_1.0 +{ + global: + __wine_dbg_register; + __wine_dbg_unregister; + __wine_dbg_vlog; + __wine_dbg_vprintf; + __wine_dbg_vsprintf; + __wine_dbgstr_an; + __wine_dbgstr_wn; + __wine_dll_register; + __wine_main_argc; + __wine_main_argv; + __wine_main_environ; + __wine_main_wargv; + wine_anon_mmap; + wine_dbg_add_option; + wine_dbg_log; + wine_dbg_parse_options; + wine_dbg_printf; + wine_dbg_sprintf; + wine_dbgstr_a; + wine_dbgstr_an; + wine_dbgstr_w; + wine_dbgstr_wn; + wine_dlclose; + wine_dll_get_owner; + wine_dll_load; + wine_dll_load_main_exe; + wine_dll_set_callback; + wine_dll_unload; + wine_dlopen; + wine_dlsym; + wine_exec_wine_binary; + wine_free_pe_load_area; + wine_get_config_dir; + wine_get_cs; + wine_get_ds; + wine_get_es; + wine_get_fs; + wine_get_gs; + wine_get_server_dir; + wine_get_ss; + wine_get_user_name; + wine_init; + wine_init_argv0_path; + wine_ldt_alloc_entries; + wine_ldt_alloc_fs; + wine_ldt_copy; + wine_ldt_free_entries; + wine_ldt_free_fs; + wine_ldt_get_entry; + wine_ldt_get_ptr; + wine_ldt_init_fs; + wine_ldt_init_locking; + wine_ldt_is_system; + wine_ldt_realloc_entries; + wine_ldt_set_entry; + wine_pthread_abort_thread; + wine_pthread_create_thread; + wine_pthread_exit_thread; + wine_pthread_init_current_teb; + wine_pthread_init_process; + wine_pthread_init_thread; + wine_set_fs; + wine_set_gs; + wine_set_pe_load_area; + wine_switch_to_stack; + + local: *; +};