mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-12-09 06:40:24 +08:00
* 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 Reported by Albert Chin-A-Young <china@thewrittenword.com>
This commit is contained in:
parent
a3c8dc7707
commit
3423d6e7f9
@ -1,3 +1,12 @@
|
||||
2001-06-28 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
* 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
|
||||
Reported by Albert Chin-A-Young <china@thewrittenword.com>
|
||||
|
||||
2001-06-28 Tim Van Holder <tim.van.holder@pandora.be>, Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
* bootstrap: Use cp instead of ln -s, for systems without
|
||||
|
8
libtool.m4
vendored
8
libtool.m4
vendored
@ -3022,6 +3022,7 @@ if test -f "$ltmain"; then
|
||||
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) \
|
||||
@ -3336,6 +3337,9 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
|
||||
# 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
|
||||
|
||||
@ -3497,6 +3501,9 @@ symxfrm='\1 \2\3 \3'
|
||||
# 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*)
|
||||
@ -3507,6 +3514,7 @@ cygwin* | mingw* | pw32*)
|
||||
;;
|
||||
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]']
|
||||
|
12
ltmain.in
12
ltmain.in
@ -3766,27 +3766,25 @@ extern \"C\" {
|
||||
#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 */
|
||||
|
Loading…
Reference in New Issue
Block a user