Skip to content

Commit

Permalink
dim dat
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed May 3, 2024
1 parent c649cf1 commit 94d0c6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libr/bin/format/elf/elf.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* radare - LGPL - Copyright 2008-2024 - nibble, pancake, alvaro_fe */

// R2R db/formats/elf/versioninfo
// R2R db/formats/elf/reloc
#define R_LOG_ORIGIN "elf"
#include <r_types.h>
#include <r_util.h>
Expand Down Expand Up @@ -3220,7 +3221,7 @@ static size_t get_next_not_analysed_offset(ELFOBJ *eo, size_t section_vaddr, siz
return eo->dyn_info.dt_jmprel + eo->dyn_info.dt_pltrelsz - section_vaddr;
}

return UT64_MAX;
return offset; // UT64_MAX;
}

static size_t populate_relocs_record_from_section(ELFOBJ *eo, size_t pos, size_t num_relocs) {
Expand All @@ -3247,9 +3248,11 @@ static size_t populate_relocs_record_from_section(ELFOBJ *eo, size_t pos, size_t
}

size_t size = get_size_rel_mode (rel_mode);
ut64 dim_relocs = section->size / size;
dim_relocs = R_MIN (dim_relocs, num_relocs) + 2;
ut64 j;
for (j = get_next_not_analysed_offset (eo, section->rva, 0);
j < section->size && pos < num_relocs;
j < section->size && pos <= dim_relocs;
j = get_next_not_analysed_offset (eo, section->rva, j + size)) {

RBinElfReloc *reloc = r_vector_end (&eo->g_relocs);
Expand Down

0 comments on commit 94d0c6b

Please sign in to comment.