-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
16bit jump recognizing error in 32bit image. #38
Comments
Looks like this is analyzer issue, and can't be unit-tested by rasm2 line - should be some small binary? |
You can check also f000:fc11 address: which obviously (IDA thinks so too) should be: And so on... |
Thanks for reporting! This bug was hard to fix because it was caused by two bugs. It should be fixed now in git. Can you try it and reopen the bug if can't reproduce? I wrote this script to test the bug in an automated way.
|
Update README.md
See example here http://xvilka.me/phx_uefi.bin
Open bios file with radare2 using this command:
r2 -e asm.bits=32 -e io.va=true phx_uefi.bin
You should choose valid asm.bits value due to arch of image.
Do bootblock segment relocation:
[0x00000000]> S $s-0x10000 0xf000:0x0000 0x10000 0x10000 bootblk rwx
where '$s' - variable, file size (see output of '???' command)
Then set this as 16bit segment
You can check result by typing just 'S' command.
You can also set DOS-like addressing notation:
'[0000:0000]> s 0xf000:0xfff0'
Disassembly
[f000:fff0]> pd 1
f000:fff0 e908ff0000 jmp dword 0x10fefd
While here opcode is 'e908ff' and all, so this is jmp f000:fefb.
Same for f000:fefb
Which should be
f000:fefb e913fd jmp f000:fc11
The text was updated successfully, but these errors were encountered: