Skip to content
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

Rebasing the session #6495

Closed
radare opened this issue Jan 12, 2017 · 7 comments
Closed

Rebasing the session #6495

radare opened this issue Jan 12, 2017 · 7 comments

Comments

@radare
Copy link
Collaborator

radare commented Jan 12, 2017

We can change the baddr at startup time.. but this is not possible in the middle of a running session. we can use fR to relocate the flags, but this will not change the bininfo, analysis, meta, ...

I think that we should have a command to perform this action, and test it properly, also we should be able to rebase only the metadata from a specific range in memory, if we have more files opened we dont want to relocate everything.

@kazarmy
Copy link
Contributor

kazarmy commented Jan 14, 2017

How does wrongly-based metadata get into the session in the first place?

@radare
Copy link
Collaborator Author

radare commented Jan 14, 2017

?

@kazarmy
Copy link
Contributor

kazarmy commented Jan 14, 2017

Um ... are there any other reasons to rebase metadata apart from the debugger loading the binary at a different address from previously?

@radare
Copy link
Collaborator Author

radare commented Jan 14, 2017 via email

@kazarmy
Copy link
Contributor

kazarmy commented Jan 14, 2017

ah ok

@saruman9
Copy link

In my case fR didn't work. Binary file - firmware for intel x86 16bit.
Before relocating:

[3000:36fc]> f
0x000336fc 9 str.MainTask
....
[3000:36fc]> pd 1                                       
            ;-- str.MainTask:                           
            3000:36fc     .string "MainTask" ; len=9

Relocating:

[3000:36fc]> fR 0x3000:0x36fc 0x3000:0x4000
Relocated 15 flags                         
[3000:36fc]> f
0x000376fc 9 str.MainTask
...

But it didn't relocate:

[3000:36fc]> pd 1
            ;-- str.MainTask:
            3000:36fc     .string "MainTask" ; len=9

radare2 1.7.0-git 16164 @ linux-x86-64 git.1.6.0-940-gcd44fb483
commit: cd44fb4 build: 2017-09-26__16:07:4

@radare
Copy link
Collaborator Author

radare commented Apr 15, 2019

Continue working in #13753

@radare radare closed this as completed Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants