diff --git a/src/tools/msvc/gendef.pl b/src/tools/msvc/gendef.pl
index 77c3a775b0..3212627270 100644
--- a/src/tools/msvc/gendef.pl
+++ b/src/tools/msvc/gendef.pl
@@ -12,17 +12,6 @@ my @def;
 # src/tools/msvc/gendef.pl
 #
 
-sub dumpsyms
-{
-	my ($objfile, $symfile) = @_;
-	my ($symvol, $symdirs, $symbase) = splitpath($symfile);
-	my $tmpfile = catpath($symvol, $symdirs, "symbols.out");
-	system("dumpbin /symbols /out:$tmpfile $_ >NUL")
-	  && die "Could not call dumpbin";
-	rename($tmpfile, $symfile);
-	return;
-}
-
 # Given a symbol file path, loops over its contents
 # and returns a list of symbols of interest as a dictionary
 # of 'symbolname' -> symtype, where symtype is:
@@ -176,16 +165,10 @@ if (-f $deffile
 print "Generating $defname.DEF from directory $ARGV[0], platform $platform\n";
 
 my %def = ();
+my $symfile = "$ARGV[0]/all.sym";
+system("dumpbin /symbols /out:$symfile $ARGV[0]/*obj >NUL");
+extract_syms($symfile, \%def);
 
-while (<$ARGV[0]/*.obj>)    ## no critic (RequireGlobFunction);
-{
-	my $objfile = $_;
-	my $symfile = $objfile;
-	$symfile =~ s/\.obj$/.sym/i;
-	dumpsyms($objfile, $symfile);
-	print ".";
-	extract_syms($symfile, \%def);
-}
 print "\n";
 
 writedef($deffile, $platform, \%def);
