[Top][All Lists]

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

RE: Libtool: Microsoft dumpbin as name lister

From: Peter Ekberg
Subject: RE: Libtool: Microsoft dumpbin as name lister
Date: Tue, 23 Aug 2005 07:28:39 +0200

Tim Van Holder wrote:
> >>>Regarding dumpbin not being present in the 2003 version, I
> >>>*think* it's just missing from the free toolkit and that it is
> >>>still going strong in "the real" releases of Visual Studio.
> >>
> >>OK.  I just can't test it then.
> >>
> >>
> >>>>Also, there seem to be third-party programs named `dumpbin'.  
> >>>>Does your1> test av       oid them or do they work with 
> >>
> >>your macro?  Are
> >>
> >>>they in
> >>>
> >>>>wide-spread use?  (We can just wait till someone reports 
> >>
> >>a bug, if you
> >>
> >>>>don't know; but maybe you do, or I just missed that info.)
> >>>
> >>>Hmm, I was not aware of other dumpbins, so if they are similar
> >>>there might be a problem.
> >>
> >>Completely untested (and no idea about trustworthiness):
> >>

I meant to mention (but forgot) that the executable in the
above link appears to be named libdump (but I haven't actually
installed it so I might be mistaken...)

> >>>But, as the test is currently, the located dumpbin must
> >>>not choke on the -symbols option and it must output a line
> >>>with both "External" and "some_variable" on it. So false
> >>>positives seem unlikely to me, but the test can always be
> >>>hardened.
> FYI, the dumpbin.exe provided by Visual C++ is really just a stub
> that calls link.exe (rather like symlinking unzip as zipinfo).
> Running "link /dump" has the same effect as running "dumpbin"; so
> perhaps checking for MS Link is enough - if you have identified
> the MS linker, you can use it to list symbols (and I imagine
> libtool may need to know about the linker anyway).

Oook. I guess dumpbin is available (but slightly hidden) in the
free toolkit after all...

This info made me look at the dumpbin-as-name-lister patch again
and I found an issue with it...

I had a vague recollection of a good reason not to change the
checking msg from "checking for BSD-compatible nm..." to the
new "checking for BSD- or MS-compatible name lister (nm)..."
but could not pinpoint it in memory when Ralf suggested it.
Now I remember and the reason is that I couldn't figure out a
way to use AC_CHECK_TOOL within the AC_CACHE_CHECK for nm, so
I added a new check after the check for nm and modified the
check for nm to return "no" instead of "nm" if no BSD nm was
found. Then the change to "no" was lost when I forked out the
patch for the big patch (sorry, too many trees over here) and
I didn't do enough testing with the forked out patch.

Anyway, the problem with the new checking msg is that the
output from configure is a bit strange if nm is not found,
but dumpbin is:

checking for BSD- or MS-compatible name lister (nm)... no
checking for dumpbin... dumpbin -symbols
checking the name lister (dumpbin -symbols) interface... MS dumpbin

However, the old message is strange when dumpbin is specified
by the user with NM="dumpbin -symbols":

checking for BSD-compatible nm... dumpbin -symbols
checking the name lister (dumpbin -symbols) interface... MS dumpbin 

I don't know which is best... Anyway, ignoring the somewhat strange
output for a bit, is this ok for HEAD?

2005-08-23  Peter Ekberg  <address@hidden>

        * libltdl/m4/libtool.m4 (LT_PATH_NM): Fix autodetection of
        dumpbin and also check for "link -dump -symbols" as a synonym
        for "dumpbin -symbols".

Index: libltdl/m4/libtool.m4
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.1
diff -u -r1.1 libtool.m4
--- libltdl/m4/libtool.m4       22 Aug 2005 22:33:35 -0000      1.1
+++ libltdl/m4/libtool.m4       23 Aug 2005 05:16:51 -0000
@@ -2897,13 +2897,13 @@
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+  : ${lt_cv_path_NM=no}
 if test "$lt_cv_path_NM" != "no"; then
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOL(DUMPBIN, [dumpbin -symbols], :)
+  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"],
   if test "$DUMPBIN" != ":"; then


reply via email to

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