blob: 129314ca64a7c0b5f894069502d3cd2ff1cc78af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#!/usr/bin/perl -w
use strict;
my $outfile = shift || usage ();
my $soname = shift || usage ();
my $dllname = shift || usage ();
my @symbols = ();
my %excludes = ();
my $cmd = "nm -D $soname";
@excludes {qw(
mono_class_setup_vtable_general_new mono_debugger_init mono_debugger_main
mono_once mono_pthread_key_for_tls
mono_gc_pthread_create mono_gc_pthread_detach mono_gc_pthread_join
mono_gc_pthread_exit
mono_file_map_fileio mono_file_unmap_fileio
mono_file_map_set_allocator
)} = ();
open (SYMS, "$cmd |") || die "Cannot run \$cmd': $!\n";
while (<SYMS>) {
next unless / T (mono_.*)/;
next if exists $excludes {$1};
push @symbols, $1;
}
close (SYMS);
push @symbols, "MonoFixupCorEE";
@symbols = sort @symbols;
open (OUT, ">$outfile") || die "Cannot open '$outfile': $!\n";
print OUT "; file generated by create-windef.pl\n";
print OUT "LIBRARY $dllname\nEXPORTS\n";
print OUT join ("\n", @symbols);
print OUT "\n";
close (OUT);
sub usage {
print "Usage: create-windef.pl output_file soname dllname\n";
exit (1);
}
|