Rizin
unix-like reverse engineering framework and cli tools
bin_elf64.c File Reference
#include "bin_elf.inc"

Go to the source code of this file.

Macros

#define RZ_BIN_ELF64   1
 

Functions

static bool check_buffer (RzBuffer *buf)
 
static ut64 get_elf_vaddr64 (RzBinFile *bf, ut64 baddr, ut64 paddr, ut64 vaddr)
 

Variables

RzBinPlugin rz_bin_plugin_elf64
 
RZ_API RzLibStruct rizin_plugin
 

Macro Definition Documentation

◆ RZ_BIN_ELF64

#define RZ_BIN_ELF64   1

Definition at line 5 of file bin_elf64.c.

Function Documentation

◆ check_buffer()

static bool check_buffer ( RzBuffer buf)
static

Definition at line 8 of file bin_elf64.c.

8  {
9  return check_buffer_aux(buf) == ELFCLASS64;
10 }
voidpf void * buf
Definition: ioapi.h:138
#define ELFCLASS64
Definition: common.h:54

References ELFCLASS64.

◆ get_elf_vaddr64()

static ut64 get_elf_vaddr64 ( RzBinFile bf,
ut64  baddr,
ut64  paddr,
ut64  vaddr 
)
static

Definition at line 12 of file bin_elf64.c.

12  {
13  // NOTE(aaSSfxxx): since RVA is vaddr - "official" image base, we just need to add imagebase to vaddr
14  ELFOBJ *bin = bf->o->bin_obj;
15  return bin->baddr - bin->boffset + vaddr;
16 }
#define ELFOBJ
Definition: elf.h:24
Definition: malloc.c:26
RzBinObject * o
Definition: rz_bin.h:305
void * bin_obj
Definition: rz_bin.h:293

References rz_bin_object_t::bin_obj, ELFOBJ, and rz_bin_file_t::o.

Variable Documentation

◆ rizin_plugin

RZ_API RzLibStruct rizin_plugin
Initial value:
= {
.type = RZ_LIB_TYPE_BIN,
}
RzBinPlugin rz_bin_plugin_elf64
Definition: bin_elf64.c:18
@ RZ_LIB_TYPE_BIN
Definition: rz_lib.h:75
#define RZ_VERSION
Definition: rz_version.h:8
char * version
Definition: rz_bin.h:512

Definition at line 52 of file bin_elf64.c.

◆ rz_bin_plugin_elf64

RzBinPlugin rz_bin_plugin_elf64

Definition at line 18 of file bin_elf64.c.