mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 15:41:38 +00:00
Fix warnings in RBin.{dmp,elf} (#17865)
This commit is contained in:
parent
0b8eb60ff7
commit
e9916a1914
@ -39,8 +39,8 @@ static int r_bin_dmp64_init_memory_runs(struct r_bin_dmp64_obj_t *obj) {
|
||||
free (runs);
|
||||
return false;
|
||||
}
|
||||
page->start = (run->BasePage + j) * PAGE_SIZE ;
|
||||
page->file_offset = base + num_page * PAGE_SIZE;
|
||||
page->start = (run->BasePage + j) * DMP_PAGE_SIZE ;
|
||||
page->file_offset = base + num_page * DMP_PAGE_SIZE;
|
||||
r_list_append (obj->pages, page);
|
||||
num_page++;
|
||||
}
|
||||
@ -90,8 +90,8 @@ static int r_bin_dmp64_init_bmp_pages(struct r_bin_dmp64_obj_t *obj) {
|
||||
if (!page) {
|
||||
return false;
|
||||
}
|
||||
page->start = i * PAGE_SIZE;
|
||||
page->file_offset = paddr_base + num_bitset * PAGE_SIZE;
|
||||
page->start = i * DMP_PAGE_SIZE;
|
||||
page->file_offset = paddr_base + num_bitset * DMP_PAGE_SIZE;
|
||||
r_list_append (obj->pages, page);
|
||||
num_bitset++;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define DMP_DUMPTYPE_BITMAPKERNEL 6
|
||||
#define DMP_DUMPTYPE_AUTOMATIC 7
|
||||
|
||||
#define PAGE_SIZE 0x1000
|
||||
#define DMP_PAGE_SIZE 0x1000
|
||||
|
||||
typedef struct _PHYSICAL_MEMORY_RUN {
|
||||
ut64 BasePage;
|
||||
|
@ -42,19 +42,6 @@
|
||||
#define COMPUTE_PLTGOT_POSITION(rel, pltgot_addr, n_initial_unused_entries) \
|
||||
((rel->rva - pltgot_addr - n_initial_unused_entries * R_BIN_ELF_WORDSIZE) / R_BIN_ELF_WORDSIZE)
|
||||
|
||||
#if R_BIN_ELF64
|
||||
static inline int UTX_MUL(ut64 *r, ut64 a, ut64 b) {
|
||||
return UT64_MUL (r, a, b);
|
||||
}
|
||||
#else
|
||||
static inline int UTX_MUL(ut64 *r, ut64 a, ut64 b) {
|
||||
ut32 r2 = *r;
|
||||
int res = UT32_MUL (&r2, a, b);
|
||||
*r = r2;
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define GROWTH_FACTOR (1.5)
|
||||
|
||||
#define round_up(a) ((((a) + (4) - (1)) / (4)) * (4))
|
||||
|
@ -103,9 +103,9 @@ static RList *sections(RBinFile *bf) {
|
||||
|
||||
ptr->name = strdup ("Memory_Section");
|
||||
ptr->paddr = page->file_offset;
|
||||
ptr->size = PAGE_SIZE;
|
||||
ptr->size = DMP_PAGE_SIZE;
|
||||
ptr->vaddr = page->start;
|
||||
ptr->vsize = PAGE_SIZE;
|
||||
ptr->vsize = DMP_PAGE_SIZE;
|
||||
ptr->add = true;
|
||||
ptr->perm = R_PERM_R;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user