From: Alexandre Oliva Date: Mon, 8 Mar 1999 21:55:25 +0000 (+0000) Subject: * ltmain.in: extract symbols from program objects to nlist first, X-Git-Tag: release-1-2f~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d917d79899165db37079de0a0dd76ac7125abb03;p=thirdparty%2Flibtool.git * ltmain.in: extract symbols from program objects to nlist first, then translate them to the export_symbols format. Now it works, but it appears to be needlessly extracting the symbol list from dlpreopened libraries twice --- diff --git a/ChangeLog b/ChangeLog index c6f9bf423..5570ff999 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,14 @@ 1999-03-08 Alexandre Oliva + * ltmain.in: extract symbols from program objects to nlist first, + then translate them to the export_symbols format. Now it works, + but it appears to be needlessly extracting the symbol list from + dlpreopened libraries twice + * ltmain.in: temporarily disable dlopen_self when linking with -static or -all-static, until we figure out how to test whether it works at configure time + * TODO: remember to fix this later * tests/build-relink.test: when hell is expected to fail, run it diff --git a/ltmain.in b/ltmain.in index b6382e6f4..b067ff0b8 100644 --- a/ltmain.in +++ b/ltmain.in @@ -2328,8 +2328,7 @@ extern \"C\" { /* External symbol declarations for the compiler. */\ " - # Prepare the list of exported symbols - if test "$dlself" = yes && test -z "$export_symbols"; then + if test "$dlself" = yes; then $show "generating symbol list for \`$output'" export_symbols="$objdir/$output.exp" $run $rm $export_symbols @@ -2338,24 +2337,28 @@ extern \"C\" { progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$export_symbols'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done - - if test -n "$exclude_expsyms"; then - $run eval 'egrep -v "^($exclude_expsyms)" "$export_symbols" > "${export_symbols}T"' - $run eval '$mv ${export_symbols}T $export_symbols' - fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$objdir/$output.exp" + $run $rm $export_symbols + + if test -n "$exclude_expsyms"; then + $run eval 'egrep -v "^($exclude_expsyms)" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi - if test -n "$export_symbols_regex"; then - $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi + if test -n "$export_symbols_regex"; then + $show "egrep -e \"$export_symbols_regex\" \"$nlist\" > \"$nlist\"T" + $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $show "$mv \"$nlist\"T \"$nlist\"" + $run eval '$mv "$nlist"T "$nlist"' + fi - if test "$dlself" = yes; then - $run eval 'sed -e "s/^\(.*\)/\1 \1/" < "$export_symbols" > "$nlist"' + sed -e 's/^.* \(.*\)$/\1/' < "$nlist" > "$export_symbols" + fi fi for arg in $dlprefiles; do