问题描述
我在 IDA
(7.5 pro) 中反汇编了一个简单的 Hello World 程序,如下所示:
global _main
extern _printf
section .text
_main:
push message
call _printf
add esp,4
ret
message:
db 'Hello,World',10,0
现在我对代码进行了以下更改(只需调用 printf
函数两次):
global _main
extern _printf
section .text
_main:
push message
call _printf
add esp,4
push message2
call _printf
add esp,There',0
message2:
db 'Im here!',0
并使用“将补丁应用于输入文件...”再次编译代码现在当我调用补丁文件(HelloWorld.exe)时,它只显示第一个txt 行 - “Hello,There”,没有第二行(“我在这里!”)。如果我以标准方式编译程序,最奇怪的是什么 - 通过使用 nasm
编译器 (nasm -fwin32 helloworld.asm,gcc helloworld.obj
) 程序按预期工作 - 它显示两行文本。 IDA
的内置编译器生成的代码的行为与“普通”编译器生成的代码不同的原因是什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)