开发者

SymtabAPI doesn't implicity change binary

开发者 https://www.devze.com 2023-03-06 06:59 出处:网络
I\'m using the DyninstAPI (namely, the SymtabAPI component) to rewrite the symbol tables in binaries.I\'m using the following methods to do so:

I'm using the DyninstAPI (namely, the SymtabAPI component) to rewrite the symbol tables in binaries. I'm using the following methods to do so:

data_region->setPtrToRawData((void*) new_raw, data_region->get开发者_JS百科RegionSize())

The method returns successfully, I check my error codes, and I even re-read the data section which has successfully been replaced. The problem is that the original binary isn't rewritten with the new raw .data section, and the original raw .data section persists.

I've scoured the manual to see if there is some sort of commit function but none is documented and nothing of the sort is mentioned in the examples. EDIT: I just read through some of the source code for the Region class, and it looks like I'm essentially doing what patchData does (in case that is the method I should be using).

Suggestions?

The programming manuals are available at http://www.paradyn.org/html/manuals.html.

P.S. hopefully a more reputable user can add the tags DyninstAPI and SymtabAPI for me.


After consulting with the developers, they alerted me that the function I needed to call was emit and the syntax I ended up using was:

symtab_obj->emit("new_binary.out");

Thanks Drew!

0

精彩评论

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