[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nm prints warnings when processing stripped shared libraries

From: Ralf Wildenhues
Subject: Re: nm prints warnings when processing stripped shared libraries
Date: Fri, 10 Dec 2004 10:22:07 +0100
User-agent: Mutt/1.4.1i

Hi Martin,

* Martin Waitz wrote on Thu, Dec 09, 2004 at 03:30:10PM CET:
> libtool uses nm to extract symbols from libraries:
>         for arg in $dlprefiles; do
>           $show "extracting global C symbols from \`$arg'"
>           name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
>           $run eval '$echo ": $name " >> "$nlist"'
>           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
>         done
> If such a library is stripped (as is the case for all installed
> libraries on this Debian system here), then nm complains that it
> cannot find any symbols.

I presume this occurs because it works on deplibs of preloaded libs,

> This is not bad per se, but very annoying when used with make -s and
> libtool --silent as it prints a lot of false error messages.


> Could libtool please redirect nm stderr to /dev/null or take other
> actions to suppress the warning.
> Or perhaps use objdump which uses stdout to print 'no symbols'.

The latter is not possible, because libtool relies on a special output
format of $NM, and I really don't want to mess with that.

What I am wondering, though, is whether we would lose important
information if we did the former.  Since this is not an important bug to
fix, I'd rather only test this on the HEAD branch of libtool first, and
not put it into branch-1-5.

What do the others think?  OK to apply this patch to HEAD?


        * config/ltmain.m4sh (func_extract_archive): Send stderr of $NM 
        to /dev/null.  Reported by Martin Waitz <address@hidden>.

Index: config/ltmain.m4sh
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.34
diff -u -r1.34 ltmain.m4sh
--- config/ltmain.m4sh  9 Dec 2004 17:59:15 -0000       1.34
+++ config/ltmain.m4sh  10 Dec 2004 09:20:48 -0000
@@ -818,7 +818,7 @@
          $opt_dry_run || {
            eval '$ECHO ": $name " >> "$nlist"'
-           eval "$NM $dlprefile | $global_symbol_pipe >> '$nlist'"
+           eval "$NM $dlprefile >/dev/null | $global_symbol_pipe >> '$nlist'"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]