https://bitbucket.org/daniel_fort/magic-lantern
Revision 14eb7b3805a07d10ab8c261601c1a074dbd6fc57 authored by Trammell Hudson on 25 May 2009, 18:45:17 UTC, committed by Trammell Hudson on 25 May 2009, 18:45:17 UTC
1 parent eeb7f28
Raw File
Tip revision: 14eb7b3805a07d10ab8c261601c1a074dbd6fc57 authored by Trammell Hudson on 25 May 2009, 18:45:17 UTC
Lots of dialog stuff, no progress
Tip revision: 14eb7b3
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