Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | MAX_SHARED_LIBS 1 |
#define | FLAT_DATA_ALIGN 0x20 |
#define | READ(x, i) |
Functions | |
static bool | bflt_init_hdr (RzBfltObj *bin) |
static bool | bflt_reloc_big_endian (RzBfltObj *bin) |
static void | bflt_load_relocs (RzBfltObj *bin) |
static void | patch_relocs_in (RzBfltObj *bin, RzVector *relocs) |
static void | bflt_patch_relocs (RzBfltObj *bin) |
static bool | rz_bflt_init (RzBfltObj *obj, RzBuffer *buf, ut64 baddr, bool big_endian, bool patch_relocs) |
RzBfltObj * | rz_bflt_new_buf (RzBuffer *buf, ut64 baddr, bool big_endian, bool patch_relocs) |
void | rz_bflt_free (RzBfltObj *obj) |
RzBinAddr * | rz_bflt_get_entry (RzBfltObj *bin) |
ut64 | rz_bflt_get_text_base (RzBfltObj *bin) |
Address to map text segment to. More... | |
ut64 | rz_bflt_get_data_base (RzBfltObj *bin) |
Address to map data+bss segment to. More... | |
ut64 | rz_bflt_get_data_vsize (RzBfltObj *bin) |
Total size of data+bss. More... | |
ut64 | rz_bflt_paddr_to_vaddr (RzBfltObj *bin, ut32 paddr) |
uClinux bFLT file format For reference, see linux/include/uapi/linux/flat.h linux/fs/binfmt_flat.c in the uClinux kernel, e.g. from uClinux-dist-20160919
Definition in file bflt.c.
Definition at line 26 of file bflt.c.
References BFLT_HDR_SIZE, FLAT_FLAG_GZDATA, FLAT_FLAG_GZIP, FLAT_VERSION, i, len, PFMT32u, READ, rz_buf_read_at(), RZ_LOG_WARN, and st64.
Referenced by rz_bflt_init().
|
static |
Definition at line 69 of file bflt.c.
References BFLT_HDR_SIZE, bflt_reloc_big_endian(), FLAT_FLAG_GOTPIC, i, NULL, rz_bflt_reloc_t::reloc_paddr, rz_buf_read_be32_at, rz_vector_push(), ut64(), value, and rz_bflt_reloc_t::value_orig.
Referenced by rz_bflt_init().
|
static |
Definition at line 137 of file bflt.c.
References patch_relocs_in(), rz_buf_new_sparse_overlay(), rz_buf_sparse_set_write_mode(), RZ_BUF_SPARSE_WRITE_MODE_SPARSE, and RZ_BUF_SPARSE_WRITE_MODE_THROUGH.
Referenced by rz_bflt_init().
Definition at line 61 of file bflt.c.
References FLAT_FLAG_GOTPIC.
Referenced by bflt_load_relocs().
Definition at line 123 of file bflt.c.
References rz_bflt_reloc_t::reloc_paddr, relocs(), rz_bflt_paddr_to_vaddr(), rz_vector_foreach, and rz_bflt_reloc_t::value_orig.
Referenced by bflt_patch_relocs().
void rz_bflt_free | ( | RzBfltObj * | obj | ) |
Definition at line 173 of file bflt.c.
References rz_bflt_obj_t::b, rz_bflt_obj_t::buf_patched, rz_bflt_obj_t::got_relocs, rz_bflt_obj_t::relocs, rz_buf_free(), RZ_FREE, and rz_vector_fini().
Referenced by destroy(), and rz_bflt_new_buf().
Address to map data+bss segment to.
Definition at line 198 of file bflt.c.
References FLAT_DATA_ALIGN, MAX_SHARED_LIBS, r, rz_num_align_delta(), and ut64().
Referenced by maps(), rz_bflt_paddr_to_vaddr(), and sections().
Definition at line 183 of file bflt.c.
References addr, rz_bflt_get_text_base(), and RZ_NEW0.
Referenced by entries().
Address to map text segment to.
Definition at line 193 of file bflt.c.
Referenced by maps(), rz_bflt_get_entry(), and sections().
|
static |
Definition at line 147 of file bflt.c.
References rz_bflt_obj_t::b, rz_bflt_obj_t::baddr, baddr(), bflt_init_hdr(), bflt_load_relocs(), bflt_patch_relocs(), rz_bflt_obj_t::big_endian, rz_bflt_obj_t::got_relocs, NULL, patch_relocs(), rz_bflt_obj_t::relocs, rz_buf_ref(), rz_buf_size(), rz_vector_init(), rz_bflt_obj_t::size, and UT64_MAX.
Referenced by rz_bflt_new_buf().
Definition at line 164 of file bflt.c.
References baddr(), NULL, patch_relocs(), rz_bflt_free(), rz_bflt_init(), and RZ_NEW0.
Referenced by load_buffer().
Definition at line 208 of file bflt.c.
References rz_bflt_get_data_base().
Referenced by convert_relocs(), and patch_relocs_in().