[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: |
Mon, 22 Aug 2005 14:10:14 +0200 |
Ralf Wildenhues wrote:
> Hi Peter,
>
> * Peter Ekberg wrote on Thu, Aug 18, 2005 at 02:36:47PM CEST:
> > Ralf Wildenhues wrote:
> >
> > > Missing bits below, plus: We advertise `NM' in libtool.texi as BSD
> > > compatible, and show how its output looks like (two different
> > > sections). We should update that, if possible. If you would not
> > > like to do that, I could do it if I knew how dumpbin's
> output looked
> > > like and how it behaved. As you noticed already, it's not present
> > > in the 2003 version, and I can't find an older accessible msvc to
> > > try out.
> >
> > I have attached (to prevent distortions) the output from "dumpbin
> > -symbols" after compiling the following with cl -c -o sym.obj sym.c
>
> OK, thanks.
>
> *snip*
> > 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):
> http://www.freedownloadscenter.com/Best/coff-dumpbin.html
>
> > 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.
>
> OK.
>
> > If the test is negative the found dumpbin is
> > assumed to support the BSD nm interface, which is probably
> > more likely to happen. But as you noted below, nm must be
> > Missing for that to happen and in that case you were toast
> > previously as well...
>
> ACK.
>
> > > Another remark: we change the interface provided by
> > > libtool.m4. Please
> > > update the serial number of the file.
> *snip*
>
> > Ok.
>
> Thanks.
>
> > > Lastly, can I ask a favor of you? I've seen your other
> patches, and
> > > hate to delay them even longer, but I won't be able to test
> > > them enough
> > > before the weekend. So I'd like you to not use the 72 hour rule.
> > > Thanks. I'll try to get to them as quickly as possible, if
> > > nobody else
> > > has before.
> >
> > No problem at all, I'm just beginning to feel that I have soon
> > filled the quota for at least some people with very similar-
> > looking patches, and that people are perhaps no longer reading.
>
> I am reading, but I need time.
>
> > So I just pictured your request for a 2nd maintainer to chip in
> > disappearing in the bitbucket...
>
> Well, can't do much about that, can I?
>
> > Regarding the changes to the documentation, I have not tested
> > it, so it just might look like crap or generally suck in other
> > ways. Feel free to edit or suggest fixes.
>
> Yep, sucks. :)
> To be serious: the line length is too long. Suggested change below.
>
> OK. Please apply after the following changes, if you agree.
> No need to
> post this for review again.
>
> Cheers,
> Ralf
>
>
*snip*
> | +For MS @command{dumpbin}, the symbols should be in one of
> the following
> | +formats:
> | +
> | address@hidden
> | address@hidden @var{size} UNDEF notype
> External | @var{global-variable-name}
> | address@hidden @var{address} @var{section} notype
> External | @var{global-variable-name}
> | address@hidden @var{address} @var{section} notype ()
> External | @var{global-function-name}
> | address@hidden example
>
> Please replace this with
>
> address@hidden
> address@hidden @var{size} UNDEF notype External
> | @var{global-var}
> address@hidden @var{address} @var{section} notype
> External | @var{global-var}
> address@hidden @var{address} @var{section} notype ()
> External | @var{global-func}
> address@hidden example
>
> and be done with it.
>
Ok.
*snip*
> | # Write the raw and C identifiers.
> | - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[
> ]]\($symcode$symcode*\)[[ ]][[
> ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
> | + if test "$lt_cv_nm_interface" = "MS dumpbin"; then
> | + # Fake it for dumpbin and say T for any non-static function
> | + # and D for any global variable.
> | + # Also find C++ and __fastcall symbols from MSVC++,
> | + # which start with @ or ?.
> | + lt_cv_sys_global_symbol_pipe="$SED -n -e '/ UNDEF
> [^|]*()/d; / 00* UNDEF /d;
>
> I think you are missing a pair of brackets here: ^^^
> [[^|]]
Good eyes! I'm almost certain I had that, at least at some point.
Must have gone missing in some manual backport from a working
version of ltmain.sh...
> But I'd rather like the whole sed script:
>
> | + s/.*().*External *| *$ac_symprfx$sympat.*/T $ac_symprfx\1 \1/p;
> | + s/.*External *| *$ac_symprfx$sympat.*/D $ac_symprfx\1 \1/p;
> | + s/.*().*External *| *\(address@hidden@?]]*\).*/T \1 \1/p;
> | + s/.*External *| *\(address@hidden@?]]*\).*/D \1 \1/p'"
>
> in a pair of brackets, like so:
>
> + lt_cv_sys_global_symbol_pipe="$SED -n -e ['/ UNDEF
> [^|]*()/d; / 00* UNDEF /d;
> + s/.*().*External *| *$ac_symprfx$sympat.*/T $ac_symprfx\1 \1/p;
> + s/.*External *| *$ac_symprfx$sympat.*/D $ac_symprfx\1 \1/p;
> + s/.*().*External *| *\(address@hidden@?]*\).*/T \1 \1/p;
> + s/.*External *| *\(address@hidden@?]*\).*/D \1 \1/p']"
>
> | + else
> | + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[
> ]]\($symcode$symcode*\)[[ ]][[
> ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
> | + fi
> |
> | # Check to see that the pipe works correctly.
> | pipe_works=no
>
Thanks for (all) your review(s)!
Applied, can I also apply to branch-2-0?
Cheers,
Peter
- Libtool: Microsoft dumpbin as name lister, Peter Ekberg, 2005/08/15
- RE: Libtool: Microsoft dumpbin as name lister, Peter Ekberg, 2005/08/18
- RE: Libtool: Microsoft dumpbin as name lister, Peter Ekberg, 2005/08/22
- RE: Libtool: Microsoft dumpbin as name lister,
Peter Ekberg <=
- RE: Libtool: Microsoft dumpbin as name lister, Peter Ekberg, 2005/08/23
- RE: Libtool: Microsoft dumpbin as name lister, Peter Ekberg, 2005/08/23
- RE: Libtool: Microsoft dumpbin as name lister, Peter Ekberg, 2005/08/23