SymtabAPI 不会隐式更改二进制文件
我正在使用 DyninstAPI(即 SymtabAPI 组件)来重写二进制文件中的符号表。我使用以下方法来执行此操作:
data_region->setPtrToRawData((void*) new_raw, data_region->getRegionSize())
该方法成功返回,我检查错误代码,甚至重新读取已成功替换的数据部分。问题在于原始二进制文件没有用新的原始 .data
部分重写,并且原始原始 .data
部分仍然存在。
我仔细阅读了手册,看看是否有某种commit函数,但没有记录任何内容,并且示例中也没有提到任何此类内容。 编辑:我刚刚阅读了 Region
类的一些源代码,看起来我本质上是在做 patchData
所做的事情(如果这是我应该使用的方法)。
建议?
编程手册可在 http://www.paradyn.org/html/manuals.html。
PS 希望更有信誉的用户可以为我添加 DyninstAPI
和 SymtabAPI
标签。
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->getRegionSize())
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在与开发人员协商后,他们提醒我,我需要调用的函数是
emit
,而我最终使用的语法是:谢谢 Drew!
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:Thanks Drew!