https://bitbucket.org/hudson/magic-lantern
Raw File
Tip revision: 6842f6f9623369c10c831c9cec2c50bc52dedf00 authored by hudson@kremvax on 24 June 2009, 02:55:55 UTC
Removed tag
Tip revision: 6842f6f
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__
back to top