in reply to Crashdump to binary question

binmode STDOUT; local $/; $_ = <>; s/\s+//g; # Adjust to filter out irrelevant stuff. print pack 'H*', $_;

And is it possible to keep it's offset?

Not sure what you mean by that. Did you want to prefix the bytes by $offset dummy bytes?

print "\x00" x $offset;

Or did you have some format in mind?

Replies are listed 'Best First'.
Re^2: Crashdump to binary question
by gemoroy (Beadle) on Nov 14, 2009 at 08:17 UTC
    Sorry, i've just dumbed a bit =)

    It is realy unnecessary for me to hold absolute address of loaded code, Relative is more than enough=)

    I am on unix, so i do not need binmode

    Thanks for reply!

      Actually you do. It will disable any encoding in effect on the handle.