public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* nm for .exe extensions?
@ 2016-05-24 12:46 Benjamin Cao
  2016-05-24 13:16 ` Marco Atzeri
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Benjamin Cao @ 2016-05-24 12:46 UTC (permalink / raw)
  To: cygwin

Hi,

I am working with a customer on using the nm command in Cygwin for Windows. The customer wants to be able to generate a symbol table on *.exe files similar to what nm does on unix platforms. The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.

I understand that these commands will certainly be different in both Cygwin for Windows and the unix platforms, but is there any way that *.exe will generate a symtab with nm?

Note: The customer said the Windows "dumpbin" does not satisfy his needs either... what fun.

Thanks,
Ben Cao

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 12:46 nm for .exe extensions? Benjamin Cao
@ 2016-05-24 13:16 ` Marco Atzeri
  2016-05-24 13:29   ` Marco Atzeri
                     ` (2 more replies)
  2016-05-24 13:50 ` Warren Young
  2016-05-24 14:36 ` Ken Brown
  2 siblings, 3 replies; 13+ messages in thread
From: Marco Atzeri @ 2016-05-24 13:16 UTC (permalink / raw)
  To: cygwin

On 24/05/2016 14:43, Benjamin Cao wrote:
> Hi,
>
> I am working with a customer on using the nm command in Cygwin for Windows. The customer wants to be able to generate a symbol table on *.exe files similar to what nm does on unix platforms. The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.
>
> I understand that these commands will certainly be different in both Cygwin for Windows and the unix platforms, but is there any way that *.exe will generate a symtab with nm?
>
> Note: The customer said the Windows "dumpbin" does not satisfy his needs either... what fun.
>
> Thanks,
> Ben Cao
>

How was compiled the *.exe file ?

For both Unix and Windows stripped programs do not contain any more any 
symbol. Example from one of my package:

$ nm ncview.exe |wc -l
5540

$ nm ncview.exe |tail
00440824 T _XUndefineCursor
00424b8b t _xy_track_pointer
0062a230 b _y0.4078
0062a270 b _y0.4110
00424864 t _yaxis_range_callback
00626a68 b _ydim_selection_widget
00626a6c b _ydimlist_label_widget
00626a70 b _ydimlist_widget
00632890 i fthunk
00632498 i hname

but
$ nm /usr/bin/ncview.exe
nm: /usr/bin/ncview.exe: no symbols

As the installed version was stripped.




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 13:16 ` Marco Atzeri
@ 2016-05-24 13:29   ` Marco Atzeri
  2016-05-24 13:57   ` Marco Atzeri
  2016-05-24 16:44   ` Marco Atzeri
  2 siblings, 0 replies; 13+ messages in thread
From: Marco Atzeri @ 2016-05-24 13:29 UTC (permalink / raw)
  To: cygwin

On 24/05/2016 14:43, Benjamin Cao wrote:
> Hi,
>
> I am working with a customer on using the nm command in Cygwin for Windows. The customer wants to be able to generate a symbol table on *.exe files similar to what nm does on unix platforms. The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.
>
> I understand that these commands will certainly be different in both Cygwin for Windows and the unix platforms, but is there any way that *.exe will generate a symtab with nm?
>
> Note: The customer said the Windows "dumpbin" does not satisfy his needs either... what fun.
>
> Thanks,
> Ben Cao
>

How was compiled the *.exe file ?

For both Unix and Windows stripped programs do not contain any more any 
symbol. Example from one of my package:

$ nm ncview.exe |wc -l
5540

$ nm ncview.exe |tail
00440824 T _XUndefineCursor
00424b8b t _xy_track_pointer
0062a230 b _y0.4078
0062a270 b _y0.4110
00424864 t _yaxis_range_callback
00626a68 b _ydim_selection_widget
00626a6c b _ydimlist_label_widget
00626a70 b _ydimlist_widget
00632890 i fthunk
00632498 i hname

but
$ nm /usr/bin/ncview.exe
nm: /usr/bin/ncview.exe: no symbols

As the installed version was stripped.




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 12:46 nm for .exe extensions? Benjamin Cao
  2016-05-24 13:16 ` Marco Atzeri
@ 2016-05-24 13:50 ` Warren Young
  2016-05-24 14:34   ` Warren Young
                     ` (2 more replies)
  2016-05-24 14:36 ` Ken Brown
  2 siblings, 3 replies; 13+ messages in thread
From: Warren Young @ 2016-05-24 13:50 UTC (permalink / raw)
  To: The Cygwin Mailing List

On May 24, 2016, at 6:43 AM, Benjamin Cao <becao@progress.com> wrote:
> 
> The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.

That’s not what I see here.  Given hello.c containing a “Hello, world!” program:

  $ make hello
  cc     hello.c   -o hello
  $ nm hello.exe | wc -l
  389

If I strip the exe, I get “No symbols,” as expected.  There’s no reason a finished executable should have much in the way of exported symbols without debug info, since it is self-contained.  You would only expect to get useful output from nm on a stripped binary if it’s an object file or a DLL.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 13:16 ` Marco Atzeri
  2016-05-24 13:29   ` Marco Atzeri
@ 2016-05-24 13:57   ` Marco Atzeri
  2016-05-24 16:44   ` Marco Atzeri
  2 siblings, 0 replies; 13+ messages in thread
From: Marco Atzeri @ 2016-05-24 13:57 UTC (permalink / raw)
  To: cygwin

On 24/05/2016 14:43, Benjamin Cao wrote:
> Hi,
>
> I am working with a customer on using the nm command in Cygwin for Windows. The customer wants to be able to generate a symbol table on *.exe files similar to what nm does on unix platforms. The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.
>
> I understand that these commands will certainly be different in both Cygwin for Windows and the unix platforms, but is there any way that *.exe will generate a symtab with nm?
>
> Note: The customer said the Windows "dumpbin" does not satisfy his needs either... what fun.
>
> Thanks,
> Ben Cao
>

How was compiled the *.exe file ?

For both Unix and Windows stripped programs do not contain any more any 
symbol. Example from one of my package:

$ nm ncview.exe |wc -l
5540

$ nm ncview.exe |tail
00440824 T _XUndefineCursor
00424b8b t _xy_track_pointer
0062a230 b _y0.4078
0062a270 b _y0.4110
00424864 t _yaxis_range_callback
00626a68 b _ydim_selection_widget
00626a6c b _ydimlist_label_widget
00626a70 b _ydimlist_widget
00632890 i fthunk
00632498 i hname

but
$ nm /usr/bin/ncview.exe
nm: /usr/bin/ncview.exe: no symbols

As the installed version was stripped.




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 13:50 ` Warren Young
@ 2016-05-24 14:34   ` Warren Young
  2016-05-24 16:56   ` Warren Young
  2016-06-07 15:43   ` Bill Smith
  2 siblings, 0 replies; 13+ messages in thread
From: Warren Young @ 2016-05-24 14:34 UTC (permalink / raw)
  To: The Cygwin Mailing List

On May 24, 2016, at 6:43 AM, Benjamin Cao <becao@progress.com> wrote:
> 
> The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.

That’s not what I see here.  Given hello.c containing a “Hello, world!” program:

  $ make hello
  cc     hello.c   -o hello
  $ nm hello.exe | wc -l
  389

If I strip the exe, I get “No symbols,” as expected.  There’s no reason a finished executable should have much in the way of exported symbols without debug info, since it is self-contained.  You would only expect to get useful output from nm on a stripped binary if it’s an object file or a DLL.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 12:46 nm for .exe extensions? Benjamin Cao
  2016-05-24 13:16 ` Marco Atzeri
  2016-05-24 13:50 ` Warren Young
@ 2016-05-24 14:36 ` Ken Brown
  2 siblings, 0 replies; 13+ messages in thread
From: Ken Brown @ 2016-05-24 14:36 UTC (permalink / raw)
  To: cygwin

On 5/24/2016 8:43 AM, Benjamin Cao wrote:
> I am working with a customer on using the nm command in Cygwin for Windows. The customer wants to be able to generate a symbol table on *.exe files similar to what nm does on unix platforms. The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.

Is he running nm on stripped executables?

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 13:16 ` Marco Atzeri
  2016-05-24 13:29   ` Marco Atzeri
  2016-05-24 13:57   ` Marco Atzeri
@ 2016-05-24 16:44   ` Marco Atzeri
  2 siblings, 0 replies; 13+ messages in thread
From: Marco Atzeri @ 2016-05-24 16:44 UTC (permalink / raw)
  To: cygwin

On 24/05/2016 14:43, Benjamin Cao wrote:
> Hi,
>
> I am working with a customer on using the nm command in Cygwin for Windows. The customer wants to be able to generate a symbol table on *.exe files similar to what nm does on unix platforms. The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.
>
> I understand that these commands will certainly be different in both Cygwin for Windows and the unix platforms, but is there any way that *.exe will generate a symtab with nm?
>
> Note: The customer said the Windows "dumpbin" does not satisfy his needs either... what fun.
>
> Thanks,
> Ben Cao
>

How was compiled the *.exe file ?

For both Unix and Windows stripped programs do not contain any more any 
symbol. Example from one of my package:

$ nm ncview.exe |wc -l
5540

$ nm ncview.exe |tail
00440824 T _XUndefineCursor
00424b8b t _xy_track_pointer
0062a230 b _y0.4078
0062a270 b _y0.4110
00424864 t _yaxis_range_callback
00626a68 b _ydim_selection_widget
00626a6c b _ydimlist_label_widget
00626a70 b _ydimlist_widget
00632890 i fthunk
00632498 i hname

but
$ nm /usr/bin/ncview.exe
nm: /usr/bin/ncview.exe: no symbols

As the installed version was stripped.




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 13:50 ` Warren Young
  2016-05-24 14:34   ` Warren Young
@ 2016-05-24 16:56   ` Warren Young
  2016-06-07 15:43   ` Bill Smith
  2 siblings, 0 replies; 13+ messages in thread
From: Warren Young @ 2016-05-24 16:56 UTC (permalink / raw)
  To: The Cygwin Mailing List

On May 24, 2016, at 6:43 AM, Benjamin Cao <becao@progress.com> wrote:
> 
> The executable, when run with nm in Cygwin, results in a "no symbols" result, whereas it generates a symbol table in unix.

That’s not what I see here.  Given hello.c containing a “Hello, world!” program:

  $ make hello
  cc     hello.c   -o hello
  $ nm hello.exe | wc -l
  389

If I strip the exe, I get “No symbols,” as expected.  There’s no reason a finished executable should have much in the way of exported symbols without debug info, since it is self-contained.  You would only expect to get useful output from nm on a stripped binary if it’s an object file or a DLL.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-05-24 13:50 ` Warren Young
  2016-05-24 14:34   ` Warren Young
  2016-05-24 16:56   ` Warren Young
@ 2016-06-07 15:43   ` Bill Smith
  2016-06-07 16:12     ` Corinna Vinschen
  2 siblings, 1 reply; 13+ messages in thread
From: Bill Smith @ 2016-06-07 15:43 UTC (permalink / raw)
  To: cygwin

Warren Young-2 wrote
> On May 24, 2016, at 6:43 AM, Benjamin Cao &lt;

> becao@

> &gt; wrote:
>> 
>> The executable, when run with nm in Cygwin, results in a "no symbols"
>> result, whereas it generates a symbol table in unix.
> 
> That’s not what I see here.  Given hello.c containing a “Hello, world!”
> program:
> 
>   $ make hello
>   cc     hello.c   -o hello
>   $ nm hello.exe | wc -l
>   389
> 
> If I strip the exe, I get “No symbols,” as expected.  There’s no reason a
> finished executable should have much in the way of exported symbols
> without debug info, since it is self-contained.  You would only expect to
> get useful output from nm on a stripped binary if it’s an object file or a
> DLL.

Hi, I'm picking this issue up from my colleague, Ben Cao.  We're using
Visual Studio C++ to compile the executables/objects.  Is the issue that
Visual Studio places the information in the .pdb file?  That's why nm
doesn't display any info on an *.exe ?




--
View this message in context: http://cygwin.1069669.n5.nabble.com/nm-for-exe-extensions-tp127152p127453.html
Sent from the Cygwin list mailing list archive at Nabble.com.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-06-07 15:43   ` Bill Smith
@ 2016-06-07 16:12     ` Corinna Vinschen
  2016-06-07 16:24       ` Ismail Donmez
  0 siblings, 1 reply; 13+ messages in thread
From: Corinna Vinschen @ 2016-06-07 16:12 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

On Jun  7 08:43, Bill Smith wrote:
> Warren Young-2 wrote
> > On May 24, 2016, at 6:43 AM, Benjamin Cao &lt;
> 
> > becao@
> 
> > &gt; wrote:
> >> 
> >> The executable, when run with nm in Cygwin, results in a "no symbols"
> >> result, whereas it generates a symbol table in unix.
> > 
> > That’s not what I see here.  Given hello.c containing a “Hello, world!”
> > program:
> > 
> >   $ make hello
> >   cc     hello.c   -o hello
> >   $ nm hello.exe | wc -l
> >   389
> > 
> > If I strip the exe, I get “No symbols,” as expected.  There’s no reason a
> > finished executable should have much in the way of exported symbols
> > without debug info, since it is self-contained.  You would only expect to
> > get useful output from nm on a stripped binary if it’s an object file or a
> > DLL.
> 
> Hi, I'm picking this issue up from my colleague, Ben Cao.  We're using
> Visual Studio C++ to compile the executables/objects.  Is the issue that
> Visual Studio places the information in the .pdb file?  That's why nm
> doesn't display any info on an *.exe ?

PDB is an undocumented and potentially patent-encumbered format, that's
why the binutils tools can't read or write it.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-06-07 16:12     ` Corinna Vinschen
@ 2016-06-07 16:24       ` Ismail Donmez
  2016-06-07 20:32         ` Corinna Vinschen
  0 siblings, 1 reply; 13+ messages in thread
From: Ismail Donmez @ 2016-06-07 16:24 UTC (permalink / raw)
  To: cygwin

Hi,

On Tue, Jun 7, 2016 at 7:12 PM, Corinna Vinschen
<corinna-cygwin@cygwin.com> wrote:
> On Jun  7 08:43, Bill Smith wrote:
>> Warren Young-2 wrote
>> > On May 24, 2016, at 6:43 AM, Benjamin Cao &lt;
>>
>> > becao@
>>
>> > &gt; wrote:
>> >>
>> >> The executable, when run with nm in Cygwin, results in a "no symbols"
>> >> result, whereas it generates a symbol table in unix.
>> >
>> > That’s not what I see here.  Given hello.c containing a “Hello, world!”
>> > program:
>> >
>> >   $ make hello
>> >   cc     hello.c   -o hello
>> >   $ nm hello.exe | wc -l
>> >   389
>> >
>> > If I strip the exe, I get “No symbols,” as expected.  There’s no reason a
>> > finished executable should have much in the way of exported symbols
>> > without debug info, since it is self-contained.  You would only expect to
>> > get useful output from nm on a stripped binary if it’s an object file or a
>> > DLL.
>>
>> Hi, I'm picking this issue up from my colleague, Ben Cao.  We're using
>> Visual Studio C++ to compile the executables/objects.  Is the issue that
>> Visual Studio places the information in the .pdb file?  That's why nm
>> doesn't display any info on an *.exe ?
>
> PDB is an undocumented and potentially patent-encumbered format, that's
> why the binutils tools can't read or write it.

This will hopefully be no longer true in the future:
https://github.com/Microsoft/microsoft-pdb

ismail

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: nm for .exe extensions?
  2016-06-07 16:24       ` Ismail Donmez
@ 2016-06-07 20:32         ` Corinna Vinschen
  0 siblings, 0 replies; 13+ messages in thread
From: Corinna Vinschen @ 2016-06-07 20:32 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]

On Jun  7 19:23, Ismail Donmez wrote:
> Hi,
> 
> On Tue, Jun 7, 2016 at 7:12 PM, Corinna Vinschen
> <corinna-cygwin@cygwin.com> wrote:
> > On Jun  7 08:43, Bill Smith wrote:
> >> Warren Young-2 wrote
> >> > On May 24, 2016, at 6:43 AM, Benjamin Cao &lt;
> >>
> >> > becao@
> >>
> >> > &gt; wrote:
> >> >>
> >> >> The executable, when run with nm in Cygwin, results in a "no symbols"
> >> >> result, whereas it generates a symbol table in unix.
> >> >
> >> > That’s not what I see here.  Given hello.c containing a “Hello, world!”
> >> > program:
> >> >
> >> >   $ make hello
> >> >   cc     hello.c   -o hello
> >> >   $ nm hello.exe | wc -l
> >> >   389
> >> >
> >> > If I strip the exe, I get “No symbols,” as expected.  There’s no reason a
> >> > finished executable should have much in the way of exported symbols
> >> > without debug info, since it is self-contained.  You would only expect to
> >> > get useful output from nm on a stripped binary if it’s an object file or a
> >> > DLL.
> >>
> >> Hi, I'm picking this issue up from my colleague, Ben Cao.  We're using
> >> Visual Studio C++ to compile the executables/objects.  Is the issue that
> >> Visual Studio places the information in the .pdb file?  That's why nm
> >> doesn't display any info on an *.exe ?
> >
> > PDB is an undocumented and potentially patent-encumbered format, that's
> > why the binutils tools can't read or write it.
> 
> This will hopefully be no longer true in the future:
> https://github.com/Microsoft/microsoft-pdb

Interesting.  Now somebody just have to pick this up and port it to
binutils...  (the good old SHTDI meme ;))


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-06-07 20:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 12:46 nm for .exe extensions? Benjamin Cao
2016-05-24 13:16 ` Marco Atzeri
2016-05-24 13:29   ` Marco Atzeri
2016-05-24 13:57   ` Marco Atzeri
2016-05-24 16:44   ` Marco Atzeri
2016-05-24 13:50 ` Warren Young
2016-05-24 14:34   ` Warren Young
2016-05-24 16:56   ` Warren Young
2016-06-07 15:43   ` Bill Smith
2016-06-07 16:12     ` Corinna Vinschen
2016-06-07 16:24       ` Ismail Donmez
2016-06-07 20:32         ` Corinna Vinschen
2016-05-24 14:36 ` Ken Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).