[profiler] Remove support for the output=-FILENAME option.
[mono-project.git] / msvc / create-windef.pl
blob7d588b915df6e8e499648bbd642f9bad0b5a96b0
1 #!/usr/bin/perl -w
3 use strict;
5 my $outfile = shift || usage ();
6 my $soname = shift || usage ();
7 my $dllname = shift || usage ();
8 my @symbols = ();
9 my %excludes = ();
10 my $cmd = "nm -D $soname";
12 @excludes {qw(
13 mono_class_setup_vtable_general_new mono_debugger_init mono_debugger_main
14 mono_once mono_pthread_key_for_tls
15 mono_gc_pthread_create mono_gc_pthread_detach mono_gc_pthread_join
16 mono_gc_pthread_exit
17 mono_file_map_fileio mono_file_unmap_fileio
18 mono_file_map_set_allocator
19 )} = ();
21 open (SYMS, "$cmd |") || die "Cannot run \$cmd': $!\n";
22 while (<SYMS>) {
23 next unless / T (mono_.*)/;
24 next if exists $excludes {$1};
25 push @symbols, $1;
27 close (SYMS);
28 push @symbols, "MonoFixupCorEE";
29 @symbols = sort @symbols;
31 open (OUT, ">$outfile") || die "Cannot open '$outfile': $!\n";
32 print OUT "; file generated by create-windef.pl\n";
33 print OUT "EXPORTS\n";
34 print OUT join ("\n", @symbols);
35 print OUT "\n";
37 close (OUT);
39 sub usage {
40 print "Usage: create-windef.pl output_file soname dllname\n";
41 exit (1);