开发者

ARM binary and hexedit

I have an ARM binary file and want t开发者_Go百科o change some text. I remove couple of text-symbols from comment.

But the binary won't start, with log:

link_image[1710]: 3013 missing essential tables CANNOT LINK EXECUTABLE

Does anybody have an idea how to edit ARM binary files?


I remove couple of text-symbols

Stop right there. If I am reading what you wrote correctly, you removed some characters, instead of replacing them with other characters.

This would shift the whole rest of the file. But binary files often have tables or offsets which point to other parts of the file. Shifting the contents of the file, even by a single byte, means these tables or offsets no longer point where they should. The code trying to read the file was rightly confused after that.

When editing binary files, you must never move the contents, unless you know what you are doing. If you are editing the text, your changes must not change the size of the text. If the new text is smaller, you must pad it so it keeps the same size; if the new text is larger, it will not fit and you must find a shorter text.

Of course, this assumes that the file format does not have checksums which would notice the change, or that you know how to recompute them.

Also, make sure you are using a proper editor. Normal text editors can silently add, remove, or replace characters, which could break the file, possibly in a hard-to-detect way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜