Rizin
unix-like reverse engineering framework and cli tools
|
#include "elf.h"
Go to the source code of this file.
Functions | |
static bool | get_phdr_entry (ELFOBJ *bin, Elf_(Phdr) *segment, ut64 offset) |
static bool | verify_phdr_entry (ELFOBJ *bin, RzBinObjectLoadOptions *options, Elf_(Phdr) *entry) |
static bool | get_elf_segment (ELFOBJ *bin, RzBinObjectLoadOptions *options, RzBinElfSegment *segment, ut64 offset, size_t pos) |
static RzVector * | get_segments_from_phdr (ELFOBJ *bin, size_t count, RzBinObjectLoadOptions *options) |
static size_t | get_number_of_segments (ELFOBJ *bin, RzVector *sections) |
RZ_BORROW RzBinElfSegment *Elf_() | rz_bin_elf_get_segment_with_type (RZ_NONNULL ELFOBJ *bin, Elf_(Word) type) |
RZ_OWN RzVector *Elf_() | rz_bin_elf_segments_new (RZ_NONNULL ELFOBJ *bin, RzVector *sections, RZ_NONNULL RzBinObjectLoadOptions *options) |
bool Elf_() | rz_bin_elf_has_segments (RZ_NONNULL ELFOBJ *bin) |
|
static |
Definition at line 56 of file elf_segments.c.
References get_phdr_entry(), options, PFMT64x, pos, RZ_LOG_WARN, and verify_phdr_entry().
Referenced by get_segments_from_phdr().
Definition at line 101 of file elf_segments.c.
References Elf_, PN_XNUM, RZ_LOG_WARN, rz_vector_index_ptr(), and sections().
Referenced by rz_bin_elf_segments_new().
Definition at line 7 of file elf_segments.c.
References Elf_, RZ_BIN_ELF64, rz_bin_elf_read_addr(), rz_bin_elf_read_off(), rz_bin_elf_read_word(), and rz_bin_elf_read_word_xword().
Referenced by get_elf_segment().
|
static |
Definition at line 70 of file elf_segments.c.
References count, Elf_, get_elf_segment(), i, NULL, options, rz_vector_free(), rz_vector_len(), rz_vector_new(), rz_vector_push(), RzBinElfSegment, and ut64().
Referenced by rz_bin_elf_segments_new().
RZ_BORROW RzBinElfSegment* Elf_() rz_bin_elf_get_segment_with_type | ( | RZ_NONNULL ELFOBJ * | bin, |
Elf_(Word) | type | ||
) |
Definition at line 120 of file elf_segments.c.
References NULL, rz_bin_elf_foreach_segments, rz_return_val_if_fail, RzBinElfSegment, and type.
Referenced by elf_has_gnu_relro(), init_dt_dynamic(), rz_bin_elf_get_intrp(), rz_bin_elf_has_nx(), and rz_bin_elf_is_static().
bool Elf_() rz_bin_elf_has_segments | ( | RZ_NONNULL ELFOBJ * | bin | ) |
Definition at line 149 of file elf_segments.c.
References rz_return_val_if_fail.
Referenced by arch_is_mips(), convert_sections(), elf_has_gnu_relro(), get_main_offset_x86_pie(), get_targets_map_base(), rz_bin_elf_get_baddr(), rz_bin_elf_get_boffset(), rz_bin_elf_get_cpu(), rz_bin_elf_get_intrp(), rz_bin_elf_get_rpath(), rz_bin_elf_has_nx(), rz_bin_elf_p2v(), and rz_bin_elf_v2p().
RZ_OWN RzVector* Elf_() rz_bin_elf_segments_new | ( | RZ_NONNULL ELFOBJ * | bin, |
RzVector * | sections, | ||
RZ_NONNULL RzBinObjectLoadOptions * | options | ||
) |
Definition at line 133 of file elf_segments.c.
References count, Elf_, get_number_of_segments(), get_segments_from_phdr(), NULL, options, rz_bin_elf_check_array(), RZ_LOG_WARN, rz_return_val_if_fail, and sections().
Referenced by init_phdr_aux().
|
static |
Definition at line 27 of file elf_segments.c.
References Elf_, NULL, options, PT_LOAD, rz_bin_elf_add_addr(), and rz_bin_elf_add_off().
Referenced by get_elf_segment().