mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-27 01:26:07 +00:00
Improve BIOS images loading
This commit is contained in:
parent
5ba084f7df
commit
6f312e03fc
@ -87,6 +87,20 @@ static RList *sections(RBinFile *bf) {
|
||||
ptr->perm = R_PERM_RWX;
|
||||
ptr->add = true;
|
||||
r_list_append (ret, ptr);
|
||||
// TODO: Check only if bigger than 128K!
|
||||
if (bf->size > 0x20000) {
|
||||
// program headers is another section
|
||||
if (!(ptr = R_NEW0 (RBinSection))) {
|
||||
return ret;
|
||||
}
|
||||
strcpy (ptr->name, "_e000");
|
||||
ptr->vsize = ptr->size = 0x10000;
|
||||
ptr->paddr = bf->buf->length - 2 * ptr->size;
|
||||
ptr->vaddr = 0xe0000;
|
||||
ptr->perm = R_PERM_RWX;
|
||||
ptr->add = true;
|
||||
r_list_append (ret, ptr);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user