Revision 4d48a0f7fcbf96a6438e14cbbdbbe3e5205c3752 authored by a1ex on 16 May 2011, 17:58:15 UTC, committed by a1ex on 16 May 2011, 17:58:15 UTC
1 parent e309549
map2idc
#!/usr/bin/perl
use warnings;
use strict;
my $base = 0xFFF00000;
print <<"";
static main() {
#
# Parse the symbol dump from IDA Pro and output
# code into the .S file to define stubs for each of the
# entities.
#
while( <> )
{
my ($addr,$name) = /^\s*0001:([0-9A-Fa-f]+)\s+([^\s]+)\s*$/
or next;
$addr = hex($addr);
$addr += $base;
printf "MakeNameEx( 0x%08x, \"%s\", 0x2 );\n",
$addr,
$name,
;
}
print <<"";
}
__END__
Computing file changes ...