On 11/02/2014 02:25, Andrey Repin wrote:
Greetings, David Stacey!
Greetings, Andrey Repin! (I've wanted to type that for such a long time...)
I don't have my "almost everything" Cygwin install here to run it
against, so unless someone beats me to it, I won't be posting results
for many hours at least.
Delighted to oblige. I ran your perl script on all executables and DLLs
in /bin. Results attached.
Curious that mc is missing from 32-bit list.
You are quite correct. I've looked at the source code for Midnight
Commander, and getpwent() is called in three different places. The
problem was an assumption made in the 'checkfile' perl script: it was
assumed that cygwin1.dll is the first DLL listed by objdump. For mc.exe,
this isn't the case - cyggcc_s-1.dll is listed first, with cygwin1.dll
second.
I made a quick amendment to said perl script to cater for this, and the
new results are attached. The differences between the two lists are
mainly due to packages not being available for 64-bit Cygwin (e.g.
xemacs, ytree). Guile is worthy of a mention: cygguile-12.dll is in the
32-bit list, but there is no equivalent in the 64-bit list. This is
probably because the 64-bit version of guile is at a later version
compared to its 32-bit cousin.
Hopefully third time lucky!
Dave.
PS: For reference, the revised perl script is as follows:
#!/usr/bin/perl -w
my ($exe, $symbol) = @ARGV;
my $in_cygdll = 0;
die "usage: $0 exename symbol\n" unless length($symbol);
open my $dump, '-|', "objdump -p '$exe'" or die "Can't dump $exe: $!\n";
while (<$dump>) {
if (m/DLL Name: cygwin1.dll/) {
$in_cygdll = 1;
}
elsif (m/DLL Name: /) {
if ($in_cygdll) {
last; # Last cygwin1.dll symbol found; on to another DLL
}
}
elsif ($in_cygdll) {
my @parts = split;
if (@parts == 3 and $parts[2] eq $symbol) {
print "$exe\n";
last;
}
}
}
/bin/ali.exe
/bin/emacs-nox.exe
/bin/emacs-w32.exe
/bin/emacs-X11.exe
/bin/fish.exe
/bin/gdb.exe
/bin/gvim.exe
/bin/joe.exe
/bin/lefty.exe
/bin/mc.exe
/bin/nano.exe
/bin/otp.exe
/bin/pure-pwconvert.exe
/bin/tcsh.exe
/bin/vim.exe
/bin/xdvi-xaw.exe
/bin/xemacs-21.4.22.exe
/bin/ytree.exe
/bin/cygedit-0.dll
/bin/cyggtk-1-2-0.dll
/bin/cyggtk-x11-2.0-0.dll
/bin/cygguile-12.dll
/bin/cygguile-17.dll
/bin/cyggutils-1.dll
/bin/cygoctave-1.dll
/bin/cygperl5_14.dll
/bin/cygreadline5.dll
/bin/cygreadline6.dll
/bin/cygreadline7.dll
/bin/libpython2.7.dll
/bin/libpython3.2m.dll
/bin/libzsh-5.0.2.dll
/bin/ali.exe
/bin/emacs-nox.exe
/bin/emacs-w32.exe
/bin/emacs-X11.exe
/bin/fish.exe
/bin/gdb.exe
/bin/gvim.exe
/bin/joe.exe
/bin/lefty.exe
/bin/mc.exe
/bin/nano.exe
/bin/otp.exe
/bin/tcsh.exe
/bin/vim.exe
/bin/xdvi-xaw.exe
/bin/cygedit-0.dll
/bin/cyggtk-1-2-0.dll
/bin/cyggtk-x11-2.0-0.dll
/bin/cygguile-17.dll
/bin/cyggutils-1.dll
/bin/cygoctave-1.dll
/bin/cygperl5_14.dll
/bin/cygreadline7.dll
/bin/libpython2.7.dll
/bin/libpython3.2m.dll
/bin/libzsh-5.0.2.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