Index: ChangeLog =================================================================== RCS file: /cvsroot/libtool/libtool/ChangeLog,v retrieving revision 1.935 diff -u -r1.935 ChangeLog --- ChangeLog 2001/06/24 22:32:24 1.935 +++ ChangeLog 2001/06/24 23:44:09 @@ -1,3 +1,12 @@ +2001-06-25 Gary V. Vaughan + + * libtool.m4 (AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE) [HPUX]: Define + lt_cv_sys_global_symbol_to_c_name_address to be a sed expression + for mangling the output of the symbol pipe into a brace delimited + C declaration of symbol name and address. + * ltmain.in: Use it to generate the fooS.c symbol name to address + map. + 2001-06-24 Andreas Schwab * libtool.m4 (AC_LIBTOOL_SETUP): Remove failed try to Index: libtool.m4 =================================================================== RCS file: /cvsroot/libtool/libtool/libtool.m4,v retrieving revision 1.173 diff -u -r1.173 libtool.m4 --- libtool.m4 2001/06/24 22:32:25 1.173 +++ libtool.m4 2001/06/24 23:44:29 @@ -3010,6 +3010,7 @@ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ @@ -3324,6 +3325,9 @@ # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + # This is the shared library runtime path variable. runpath_var=$runpath_var @@ -3485,6 +3489,9 @@ # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + # Define system-specific variables. case $host_os in aix*) @@ -3495,6 +3502,7 @@ ;; hpux*) # Its linker distinguishes data from code symbols lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix*) [symcode='[BCDEGRST]'] Index: ltmain.in =================================================================== RCS file: /cvsroot/libtool/libtool/ltmain.in,v retrieving revision 1.260 diff -u -r1.260 ltmain.in --- ltmain.in 2001/05/27 23:20:45 1.260 +++ ltmain.in 2001/06/24 23:44:36 @@ -3746,27 +3746,25 @@ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * +# define lt_ptr void * #else -# define lt_ptr_t char * +# define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; - lt_ptr_t address; + lt_ptr address; } lt_preloaded_symbols[] = {\ " - sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ - -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ - < "$nlist" >> "$output_objdir/$dlsyms" + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr_t) 0} + {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */