Open iGr33k opened 3 years ago
obr
and obR
leads to almost the same problem, but now there are zeros at the addresses.
Could you provide the binary as well? I think obr or obR should work. As said in chat, this whole reopening thing needs to be redesigned and fixed.
Updated issue with the uploaded binary.
Confirmed the issue. Although binary info are rebased according to the new baseaddr, the functions are still at the old addresses. Moreover, there's something wrong with flags, which appear to be rebased but they really are not.. Needs investigation.
That is more or less the same problem I tried to solve here: https://github.com/rizinorg/rizin/pull/1605
The relocs are not patched because they are only patched once per Elf binary object. After line https://github.com/rizinorg/rizin/blob/f70a4da1d2ecb74dc42ae40aa90600ed396a300c/librz/bin/p/bin_elf.inc#L676 the patching code will not executed again.
Though I think rebasing and reloc patching can be solved separately.
It is not exactly the same problem i believe. One is elf specific and it's about bin info, the other is about non-bin info
binary.zip I noticed that when you change the base address of the binary using oob, all the addresses of functions and other information obtained as a result of the analysis remains tied to the original addresses that existed before the address change.
Work environment
rizin -v
full output, not truncated (mandatory)rizin 0.3.0-git @ linux-x86-64 commit: f29272cc0eb81bc0bee8d33c5eb4fe28a4eaf8de, build: 2021-09-10__12:51:40
Expected behavior
After rebasing binary with
oob
, analysed functions and other information will be moved to the new addresses.Actual behavior
After using
oob
, issuingpdf
at any function will result in printinginvalid
.Steps to reproduce the behavior
rizin ./binary
aaa
oob 0x12345678
pdf @main