Fandom

CHDK Wiki

Gpl renumber.pl

598pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

#!/usr/bin/perl -w
#
# add offset to hexdump -C
# and strings -t x

$offset = hex $ARGV[0] or do {
	print "usage: $0 0xff810000 < infile > outfile\n";
	exit;
};


print "off: $offset \n";

while (<STDIN>) {

	($addr, $line) = $_ =~ m/\s*(\w+) (.*)/;
	if (defined $addr) {
		$addr = hex $addr;
		printf "%08x %s\n", $addr + $offset, $line;
	} else {
		print $_;
	}
}

Also on Fandom

Random Wiki