Rizin
unix-like reverse engineering framework and cli tools
|
#include "elf.h"
Go to the source code of this file.
Classes | |
struct | type_translation |
struct | flag_translation |
Variables | |
static const struct type_translation | type_translation_table [] |
static const struct flag_translation | flag_translation_table [] |
|
static |
Definition at line 316 of file elf_sections.c.
References section::offset, options, PFMT64x, pos, RZ_LOG_WARN, and set_elf_section().
Referenced by convert_sections_from_shdr().
|
static |
Definition at line 349 of file elf_sections.c.
References convert_sections_from_shdr(), Elf_, get_sections_from_dt_dynamic(), options, rz_bin_elf_has_segments(), and sections().
Referenced by rz_bin_elf_convert_sections().
|
static |
Definition at line 326 of file elf_sections.c.
References convert_elf_section(), Elf_, i, NULL, options, rz_bin_elf_section_free(), rz_vector_enumerate, rz_vector_free(), rz_vector_new(), rz_vector_push(), sections(), and autogen_x86imm::tmp.
Referenced by convert_sections().
|
static |
Definition at line 66 of file elf_sections.c.
References addr, Elf_, section::offset, rz_bin_elf_v2p(), RZ_LOG_WARN, rz_vector_push(), section::size, strdup(), and UT64_MAX.
Referenced by create_section_plt(), and get_sections_from_dt_dynamic().
Definition at line 103 of file elf_sections.c.
References addr, create_section_from_phdr(), DT_JMPREL, DT_PLTRELSZ, Elf_, get_plt_name(), rz_bin_elf_get_dt_info(), and ut64().
Referenced by get_sections_from_dt_dynamic().
Definition at line 89 of file elf_sections.c.
References DT_PLTREL, DT_REL, Elf_, NULL, rz_bin_elf_get_dt_info(), and ut64().
Referenced by create_section_plt().
Definition at line 124 of file elf_sections.c.
References addr, create_section_from_phdr(), create_section_plt(), DT_PLTGOT, DT_REL, DT_RELA, DT_RELASZ, DT_RELSZ, Elf_, NULL, rz_bin_elf_get_dt_info(), rz_bin_elf_section_free(), rz_vector_free(), rz_vector_len(), rz_vector_new(), and ut64().
Referenced by convert_sections().
Definition at line 181 of file elf_sections.c.
References get_shdr_entry_aux(), PFMT64x, and RZ_LOG_WARN.
Referenced by rz_bin_elf_sections_new().
Definition at line 168 of file elf_sections.c.
References Elf_, 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_shdr_entry().
RZ_OWN RzVector* Elf_() rz_bin_elf_convert_sections | ( | RZ_NONNULL ELFOBJ * | bin, |
RZ_NONNULL RzBinObjectLoadOptions * | options, | ||
RzVector * | sections | ||
) |
Definition at line 362 of file elf_sections.c.
References convert_sections(), NULL, options, rz_return_val_if_fail, rz_vector_free(), rz_vector_len(), and sections().
Referenced by init_shdr_aux().
RZ_BORROW RzBinElfSection* Elf_() rz_bin_elf_get_section | ( | RZ_NONNULL ELFOBJ * | bin, |
Elf_(Half) | index | ||
) |
Definition at line 264 of file elf_sections.c.
References NULL, rz_return_val_if_fail, rz_vector_index_ptr(), and rz_vector_len().
Referenced by convert_elf_symbol_entry(), fix_rva_and_offset_relocable_file(), and get_section_elf_symbols().
RZ_BORROW RzBinElfSection* Elf_() rz_bin_elf_get_section_with_name | ( | RZ_NONNULL ELFOBJ * | bin, |
RZ_NONNULL const char * | name | ||
) |
Definition at line 278 of file elf_sections.c.
References NULL, rz_bin_elf_foreach_sections, and rz_return_val_if_fail.
Referenced by get_entry_offset_from_shdr(), get_gnu_debugdata_elf_symbols(), get_import_addr_x86(), get_import_addr_x86_manual(), and rz_bin_elf_get_compiler().
bool Elf_() rz_bin_elf_has_sections | ( | RZ_NONNULL ELFOBJ * | bin | ) |
Definition at line 440 of file elf_sections.c.
References rz_return_val_if_fail.
Referenced by rz_bin_elf_is_stripped().
Return a list of string representing flag options.
elf | flag |
Compare the flag to common option such as SHF_WRITE, SHF_ALLOC, ect
Definition at line 298 of file elf_sections.c.
References flag_translation::flag, flag_translation_table, i, NULL, RZ_ARRAY_SIZE, rz_list_append(), rz_list_free(), and rz_list_new().
|
static |
Definition at line 119 of file elf_sections.c.
References e, free(), and rz_bin_elf_section_t::name.
Referenced by convert_sections_from_shdr(), and get_sections_from_dt_dynamic().
Return a string representing the elf type.
elf | type |
Compare the type SHT_NULL, SHT_PROGBITS, etc and return the string representation
Definition at line 422 of file elf_sections.c.
References i, PFMT64x, RZ_ARRAY_SIZE, rz_str_new(), rz_str_newf(), SHT_HIPROC, SHT_HIUSER, SHT_LOPROC, SHT_LOUSER, type, and type_translation_table.
RZ_OWN RzVector* Elf_() rz_bin_elf_sections_new | ( | RZ_NONNULL ELFOBJ * | bin | ) |
Definition at line 378 of file elf_sections.c.
References Elf_, get_shdr_entry(), i, NULL, rz_bin_elf_check_array(), RZ_LOG_WARN, rz_return_val_if_fail, rz_vector_free(), rz_vector_new(), rz_vector_push(), and ut64().
Referenced by init().
|
static |
Definition at line 252 of file elf_sections.c.
References set_elf_section_aux(), autogen_x86imm::tmp, and verify_shdr_entry().
Referenced by convert_elf_section().
|
static |
Definition at line 210 of file elf_sections.c.
References section::align, Elf_, section::flags, section::offset, rz_bin_elf_is_relocatable(), set_elf_section_name(), SHF_ALLOC, section::size, and UT64_MAX.
Referenced by set_elf_section().
|
static |
Definition at line 190 of file elf_sections.c.
References Elf_, NULL, rz_bin_elf_strtab_get_dup(), rz_bin_elf_strtab_has_index(), rz_str_newf(), and SHT_NULL.
Referenced by set_elf_section_aux().
Definition at line 231 of file elf_sections.c.
References Elf_, NULL, rz_bin_elf_add_addr(), rz_bin_elf_add_off(), SHT_NOBITS, and SHT_SUNW_COMDAT.
Referenced by set_elf_section().
|
static |
Definition at line 1 of file elf_sections.c.
Referenced by rz_bin_elf_section_flag_to_rzlist().
|
static |
Definition at line 1 of file elf_sections.c.
Referenced by rz_bin_elf_section_type_to_string().