2013-03-01 08:57:30 +00:00
|
|
|
/* radare - LGPL - Copyright 2008-2013 - nibble, pancake */
|
2009-02-05 21:08:46 +00:00
|
|
|
|
|
|
|
#ifndef _INCLUDE_R_BIN_H_
|
|
|
|
#define _INCLUDE_R_BIN_H_
|
|
|
|
|
2010-02-07 13:11:05 +00:00
|
|
|
#include <r_util.h>
|
2009-03-08 15:49:15 +00:00
|
|
|
#include <r_types.h>
|
2010-01-14 11:13:48 +00:00
|
|
|
#include <r_list.h>
|
2012-07-12 00:47:04 +00:00
|
|
|
#include <r_bin_dwarf.h>
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2013-06-18 10:09:23 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2013-06-14 00:51:33 +00:00
|
|
|
R_LIB_VERSION_HEADER (r_bin);
|
|
|
|
|
2009-02-05 21:08:46 +00:00
|
|
|
#define R_BIN_SCN_EXECUTABLE(x) x & 0x1
|
|
|
|
#define R_BIN_SCN_WRITABLE(x) x & 0x2
|
|
|
|
#define R_BIN_SCN_READABLE(x) x & 0x4
|
|
|
|
#define R_BIN_SCN_SHAREABLE(x) x & 0x8
|
|
|
|
|
|
|
|
#define R_BIN_DBG_STRIPPED(x) x & 0x01
|
|
|
|
#define R_BIN_DBG_STATIC(x) x & 0x02
|
|
|
|
#define R_BIN_DBG_LINENUMS(x) x & 0x04
|
|
|
|
#define R_BIN_DBG_SYMS(x) x & 0x08
|
|
|
|
#define R_BIN_DBG_RELOCS(x) x & 0x10
|
|
|
|
|
2013-04-25 01:42:17 +00:00
|
|
|
#define R_BIN_SIZEOF_STRINGS 512
|
2010-10-01 02:26:52 +00:00
|
|
|
#define R_BIN_MAX_ARCH 1024
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2010-11-17 20:15:34 +00:00
|
|
|
enum {
|
|
|
|
R_BIN_SYM_ENTRY,
|
|
|
|
R_BIN_SYM_INIT,
|
|
|
|
R_BIN_SYM_MAIN,
|
2010-11-18 10:41:17 +00:00
|
|
|
R_BIN_SYM_FINI,
|
|
|
|
R_BIN_SYM_LAST
|
2010-11-17 20:15:34 +00:00
|
|
|
};
|
|
|
|
|
2011-02-23 19:53:56 +00:00
|
|
|
// name mangling types
|
|
|
|
enum {
|
2012-08-04 21:48:06 +00:00
|
|
|
R_BIN_NM_NONE = 0,
|
|
|
|
R_BIN_NM_JAVA = 1,
|
|
|
|
R_BIN_NM_CXX = 2,
|
2013-05-20 01:00:49 +00:00
|
|
|
R_BIN_NM_OBJC= 3,
|
2012-08-04 21:48:06 +00:00
|
|
|
R_BIN_NM_ANY = -1,
|
2011-02-23 19:53:56 +00:00
|
|
|
};
|
|
|
|
|
2011-10-05 00:38:37 +00:00
|
|
|
enum {
|
|
|
|
R_BIN_CLASS_PRIVATE,
|
|
|
|
R_BIN_CLASS_PUBLIC,
|
|
|
|
R_BIN_CLASS_FRIENDLY,
|
|
|
|
R_BIN_CLASS_PROTECTED,
|
|
|
|
};
|
2011-06-26 18:29:24 +00:00
|
|
|
|
2013-07-17 19:18:21 +00:00
|
|
|
enum {
|
|
|
|
R_BIN_RELOC_8,
|
|
|
|
R_BIN_RELOC_16,
|
|
|
|
R_BIN_RELOC_32,
|
|
|
|
R_BIN_RELOC_64
|
|
|
|
};
|
|
|
|
|
2012-07-21 10:11:21 +00:00
|
|
|
typedef struct r_bin_addr_t {
|
|
|
|
ut64 rva;
|
|
|
|
ut64 offset;
|
|
|
|
} RBinAddr;
|
|
|
|
|
2013-04-10 23:25:25 +00:00
|
|
|
typedef struct r_bin_hash_t {
|
|
|
|
const char *type;
|
|
|
|
ut64 addr;
|
|
|
|
int len;
|
|
|
|
ut64 from;
|
|
|
|
ut64 to;
|
|
|
|
ut8 buf[32];
|
|
|
|
const char *cmd;
|
|
|
|
} RBinHash;
|
|
|
|
|
2012-07-21 10:11:21 +00:00
|
|
|
typedef struct r_bin_info_t {
|
|
|
|
char file[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char type[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char bclass[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char rclass[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char arch[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char machine[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char os[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char subsystem[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char rpath[R_BIN_SIZEOF_STRINGS];
|
2012-11-07 03:25:42 +00:00
|
|
|
const char *lang;
|
2012-07-21 10:11:21 +00:00
|
|
|
int bits;
|
|
|
|
int has_va;
|
2012-11-07 17:18:52 +00:00
|
|
|
int has_pi; // pic/pie
|
2012-07-21 10:11:21 +00:00
|
|
|
int big_endian;
|
|
|
|
ut64 dbg_info;
|
2013-04-10 23:25:25 +00:00
|
|
|
RBinHash sum[2];
|
2012-07-21 10:11:21 +00:00
|
|
|
} RBinInfo;
|
|
|
|
|
2013-06-27 17:15:59 +00:00
|
|
|
typedef struct r_bin_object_t {
|
|
|
|
ut64 baddr;
|
|
|
|
int size;
|
|
|
|
RList/*<RBinSection>*/ *sections;
|
|
|
|
RList/*<RBinImport>*/ *imports;
|
|
|
|
RList/*<RBinSymbol>*/ *symbols;
|
|
|
|
RList/*<??>*/ *entries;
|
|
|
|
RList/*<??>*/ *fields;
|
|
|
|
RList/*<??>*/ *libs;
|
|
|
|
RList/*<??>*/ *relocs;
|
|
|
|
RList/*<??>*/ *strings;
|
|
|
|
RList/*<RBinClass>*/ *classes;
|
|
|
|
RList/*<RBinDwarfRow>*/ *lines;
|
|
|
|
RBinInfo *info;
|
|
|
|
RBinAddr *binsym[R_BIN_SYM_LAST];
|
|
|
|
int referenced;
|
|
|
|
int lang;
|
|
|
|
} RBinObject;
|
|
|
|
|
2012-08-04 21:48:06 +00:00
|
|
|
// XXX: this is a copy of RBinObject
|
|
|
|
// TODO: rename RBinArch to RBinFile
|
2010-09-24 19:23:13 +00:00
|
|
|
typedef struct r_bin_arch_t {
|
2012-08-04 21:48:06 +00:00
|
|
|
RBuffer *buf;
|
2010-10-01 02:26:52 +00:00
|
|
|
char *file;
|
2010-01-24 11:40:48 +00:00
|
|
|
int size;
|
2013-04-25 22:04:05 +00:00
|
|
|
int rawstr;
|
2011-11-21 23:59:20 +00:00
|
|
|
ut64 offset;
|
2013-06-27 17:15:59 +00:00
|
|
|
RBinObject *o;
|
2012-08-04 21:48:06 +00:00
|
|
|
void *bin_obj; // internal pointer used by formats
|
2010-09-24 19:23:13 +00:00
|
|
|
struct r_bin_plugin_t *curplugin;
|
|
|
|
} RBinArch;
|
|
|
|
|
|
|
|
typedef struct r_bin_t {
|
2012-01-18 23:19:01 +00:00
|
|
|
char *file;
|
2012-08-04 21:48:06 +00:00
|
|
|
RBinArch cur;
|
2010-09-24 19:23:13 +00:00
|
|
|
int narch;
|
2009-03-08 15:49:15 +00:00
|
|
|
void *user;
|
2010-09-24 19:23:13 +00:00
|
|
|
void *bin_obj;
|
2012-12-09 00:39:27 +00:00
|
|
|
int minstrlen;
|
2010-09-24 19:23:13 +00:00
|
|
|
struct r_bin_xtr_plugin_t *curxtr;
|
2011-12-13 13:00:22 +00:00
|
|
|
RList *plugins;
|
|
|
|
RList *binxtrs;
|
2010-02-08 10:28:17 +00:00
|
|
|
} RBin;
|
2009-03-08 15:49:15 +00:00
|
|
|
|
2010-09-24 19:23:13 +00:00
|
|
|
typedef struct r_bin_xtr_plugin_t {
|
2009-03-08 15:49:15 +00:00
|
|
|
char *name;
|
|
|
|
char *desc;
|
|
|
|
int (*init)(void *user);
|
|
|
|
int (*fini)(void *user);
|
2010-09-24 19:23:13 +00:00
|
|
|
int (*check)(RBin *bin);
|
2010-10-04 01:46:58 +00:00
|
|
|
int (*extract)(RBin *bin, int idx);
|
|
|
|
int (*load)(RBin *bin);
|
2012-08-07 08:28:03 +00:00
|
|
|
int (*size)(RBin *bin);
|
2010-02-07 12:17:51 +00:00
|
|
|
int (*destroy)(RBin *bin);
|
2010-09-24 19:23:13 +00:00
|
|
|
} RBinXtrPlugin;
|
|
|
|
|
|
|
|
typedef struct r_bin_plugin_t {
|
|
|
|
char *name;
|
|
|
|
char *desc;
|
|
|
|
int (*init)(void *user);
|
|
|
|
int (*fini)(void *user);
|
|
|
|
int (*load)(RBinArch *arch);
|
2012-08-23 10:46:55 +00:00
|
|
|
int (*size)(RBinArch *bin);
|
2010-09-24 19:23:13 +00:00
|
|
|
int (*destroy)(RBinArch *arch);
|
|
|
|
int (*check)(RBinArch *arch);
|
|
|
|
ut64 (*baddr)(RBinArch *arch);
|
2012-07-21 10:11:21 +00:00
|
|
|
RBinAddr* (*binsym)(RBinArch *arch, int num);
|
2010-09-24 19:23:13 +00:00
|
|
|
RList* (*entries)(RBinArch *arch);
|
|
|
|
RList* (*sections)(RBinArch *arch);
|
2012-08-14 16:22:24 +00:00
|
|
|
RList* (*lines)(RBinArch *arch);
|
2010-09-24 19:23:13 +00:00
|
|
|
RList* (*symbols)(RBinArch *arch);
|
|
|
|
RList* (*imports)(RBinArch *arch);
|
|
|
|
RList* (*strings)(RBinArch *arch);
|
2012-07-21 10:11:21 +00:00
|
|
|
RBinInfo* (*info)(RBinArch *arch);
|
2010-09-24 19:23:13 +00:00
|
|
|
RList* (*fields)(RBinArch *arch);
|
|
|
|
RList* (*libs)(RBinArch *arch);
|
|
|
|
RList* (*relocs)(RBinArch *arch);
|
2011-10-05 00:38:37 +00:00
|
|
|
RList* (*classes)(RBinArch *arch);
|
2011-02-27 19:30:41 +00:00
|
|
|
int (*demangle_type)(const char *str);
|
2010-02-22 03:30:34 +00:00
|
|
|
struct r_bin_meta_t *meta;
|
2010-03-08 18:40:21 +00:00
|
|
|
struct r_bin_write_t *write;
|
2011-06-26 18:29:24 +00:00
|
|
|
int (*get_offset)(RBinArch *arch, int type, int idx);
|
2011-07-25 19:10:25 +00:00
|
|
|
RBuffer* (*create)(RBin *bin, const ut8 *code, int codelen, const ut8 *data, int datalen);
|
2012-12-09 00:39:27 +00:00
|
|
|
int minstrlen;
|
2010-05-25 23:42:22 +00:00
|
|
|
} RBinPlugin;
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2010-02-08 10:28:17 +00:00
|
|
|
typedef struct r_bin_section_t {
|
2009-07-05 14:49:47 +00:00
|
|
|
char name[R_BIN_SIZEOF_STRINGS];
|
2009-07-08 11:49:55 +00:00
|
|
|
ut64 size;
|
|
|
|
ut64 vsize;
|
|
|
|
ut64 rva;
|
|
|
|
ut64 offset;
|
2010-06-17 16:45:27 +00:00
|
|
|
ut64 srwx;
|
2013-03-26 22:37:19 +00:00
|
|
|
// per section platform info
|
|
|
|
const char *arch;
|
|
|
|
int bits;
|
2010-02-08 10:28:17 +00:00
|
|
|
} RBinSection;
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2011-10-05 00:38:37 +00:00
|
|
|
typedef struct r_bin_class_t {
|
|
|
|
char *name;
|
|
|
|
char *super;
|
2012-08-22 16:02:23 +00:00
|
|
|
int index;
|
2012-11-07 09:41:12 +00:00
|
|
|
RList *methods; // <RBinSymbol>
|
|
|
|
RList *fields; // <RBinField>
|
2011-10-05 00:38:37 +00:00
|
|
|
int visibility;
|
|
|
|
} RBinClass;
|
|
|
|
|
2010-09-01 18:32:24 +00:00
|
|
|
#define RBinSectionName r_offsetof(RBinSection, name)
|
|
|
|
#define RBinSectionOffset r_offsetof(RBinSection, offset)
|
|
|
|
// usage:
|
|
|
|
// r_list_get_by_name(bin->sections, RBinSectionName, ".text");
|
|
|
|
// bin.sections.get_by_name(SectionName, ".text");
|
|
|
|
|
2010-02-08 10:28:17 +00:00
|
|
|
typedef struct r_bin_symbol_t {
|
2009-07-05 14:49:47 +00:00
|
|
|
char name[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char forwarder[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char bind[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char type[R_BIN_SIZEOF_STRINGS];
|
2012-11-07 09:41:12 +00:00
|
|
|
const char *classname;
|
2009-07-08 11:49:55 +00:00
|
|
|
ut64 rva;
|
|
|
|
ut64 offset;
|
|
|
|
ut64 size;
|
|
|
|
ut64 ordinal;
|
2010-02-08 10:28:17 +00:00
|
|
|
} RBinSymbol;
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2010-02-08 10:28:17 +00:00
|
|
|
typedef struct r_bin_import_t {
|
2009-07-05 14:49:47 +00:00
|
|
|
char name[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char bind[R_BIN_SIZEOF_STRINGS];
|
|
|
|
char type[R_BIN_SIZEOF_STRINGS];
|
2009-07-08 11:49:55 +00:00
|
|
|
ut64 ordinal;
|
2010-02-08 10:28:17 +00:00
|
|
|
} RBinImport;
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2010-09-10 09:11:38 +00:00
|
|
|
typedef struct r_bin_reloc_t {
|
2013-07-17 19:18:21 +00:00
|
|
|
ut8 type;
|
|
|
|
ut8 additive;
|
|
|
|
RBinImport *import;
|
|
|
|
st64 addend;
|
2010-09-10 09:11:38 +00:00
|
|
|
ut64 rva;
|
|
|
|
ut64 offset;
|
|
|
|
} RBinReloc;
|
|
|
|
|
2010-02-08 10:28:17 +00:00
|
|
|
typedef struct r_bin_string_t {
|
2010-11-22 00:22:27 +00:00
|
|
|
// TODO: rename string->name (avoid colisions)
|
2009-07-05 14:49:47 +00:00
|
|
|
char string[R_BIN_SIZEOF_STRINGS];
|
2009-07-08 11:49:55 +00:00
|
|
|
ut64 rva;
|
|
|
|
ut64 offset;
|
|
|
|
ut64 ordinal;
|
|
|
|
ut64 size;
|
2010-02-08 10:28:17 +00:00
|
|
|
} RBinString;
|
2009-03-16 20:07:31 +00:00
|
|
|
|
2010-02-08 10:28:17 +00:00
|
|
|
typedef struct r_bin_field_t {
|
2009-07-05 14:49:47 +00:00
|
|
|
char name[R_BIN_SIZEOF_STRINGS];
|
2009-07-08 11:49:55 +00:00
|
|
|
ut64 rva;
|
|
|
|
ut64 offset;
|
2010-02-08 10:28:17 +00:00
|
|
|
} RBinField;
|
2009-04-24 10:12:15 +00:00
|
|
|
|
2010-03-09 14:12:04 +00:00
|
|
|
typedef struct r_bin_meta_t {
|
2010-09-24 19:23:13 +00:00
|
|
|
int (*get_line)(RBinArch *arch, ut64 addr, char *file, int len, int *line);
|
2010-03-09 14:12:04 +00:00
|
|
|
} RBinMeta;
|
|
|
|
|
|
|
|
typedef struct r_bin_write_t {
|
2010-09-24 19:23:13 +00:00
|
|
|
ut64 (*scn_resize)(RBinArch *arch, const char *name, ut64 size);
|
|
|
|
int (*rpath_del)(RBinArch *arch);
|
2010-03-09 14:12:04 +00:00
|
|
|
} RBinWrite;
|
|
|
|
|
2010-10-04 08:55:43 +00:00
|
|
|
// TODO: deprecate r_bin_is_big_endian
|
|
|
|
// TODO: has_dbg_syms... maybe flags?
|
|
|
|
|
2011-06-26 18:29:24 +00:00
|
|
|
typedef int (*RBinGetOffset)(RBin *bin, int type, int idx);
|
2012-12-20 10:31:38 +00:00
|
|
|
typedef const char *(*RBinGetName)(RBin *bin, int off);
|
2011-06-26 18:29:24 +00:00
|
|
|
|
|
|
|
typedef struct r_bin_bind_t {
|
|
|
|
RBin *bin;
|
|
|
|
RBinGetOffset get_offset;
|
2012-12-20 10:31:38 +00:00
|
|
|
RBinGetName get_name;
|
2011-06-26 18:29:24 +00:00
|
|
|
} RBinBind;
|
|
|
|
|
2009-12-24 02:17:53 +00:00
|
|
|
#ifdef R_API
|
2012-08-26 09:07:09 +00:00
|
|
|
|
|
|
|
#define r_bin_class_free(x) { free(x->name);free(x->super);free (x); }
|
|
|
|
|
2010-02-22 03:30:34 +00:00
|
|
|
/* bin.c */
|
2012-12-20 10:31:38 +00:00
|
|
|
R_API void r_bin_bind(RBin *b, RBinBind *bnd);
|
2010-05-25 23:42:22 +00:00
|
|
|
R_API int r_bin_add(RBin *bin, RBinPlugin *foo);
|
2010-09-24 19:23:13 +00:00
|
|
|
R_API int r_bin_xtr_add(RBin *bin, RBinXtrPlugin *foo);
|
2010-02-07 12:17:51 +00:00
|
|
|
R_API void* r_bin_free(RBin *bin);
|
|
|
|
R_API int r_bin_list(RBin *bin);
|
2010-09-24 19:23:13 +00:00
|
|
|
R_API int r_bin_load(RBin *bin, const char *file, int dummy);
|
2013-03-03 04:03:48 +00:00
|
|
|
R_API RBinObject *r_bin_get_object(RBin *bin);
|
2010-02-07 12:17:51 +00:00
|
|
|
R_API ut64 r_bin_get_baddr(RBin *bin);
|
2010-11-18 10:41:17 +00:00
|
|
|
R_API RBinAddr* r_bin_get_sym(RBin *bin, int sym);
|
2012-11-07 03:25:42 +00:00
|
|
|
|
2011-02-27 19:30:41 +00:00
|
|
|
R_API char* r_bin_demangle(RBin *bin, const char *str);
|
|
|
|
R_API int r_bin_demangle_type (const char *str);
|
2011-02-23 19:53:56 +00:00
|
|
|
R_API char *r_bin_demangle_java(const char *str);
|
|
|
|
R_API char *r_bin_demangle_cxx(const char *str);
|
2012-11-07 09:41:12 +00:00
|
|
|
R_API char *r_bin_demangle_objc(RBin *bin, const char *sym);
|
|
|
|
R_API int r_bin_lang_objc(RBin *a);
|
2013-04-02 10:45:16 +00:00
|
|
|
R_API int r_bin_lang_cxx(RBin *a);
|
2012-11-07 03:25:42 +00:00
|
|
|
|
2010-03-10 10:01:38 +00:00
|
|
|
R_API RList* r_bin_get_entries(RBin *bin);
|
|
|
|
R_API RList* r_bin_get_fields(RBin *bin);
|
|
|
|
R_API RList* r_bin_get_imports(RBin *bin);
|
2010-02-07 13:11:05 +00:00
|
|
|
R_API RBinInfo* r_bin_get_info(RBin *bin);
|
2010-03-10 10:01:38 +00:00
|
|
|
R_API RList* r_bin_get_libs(RBin *bin);
|
2012-08-23 10:46:55 +00:00
|
|
|
R_API ut64 r_bin_get_size (RBin *bin);
|
2010-09-10 09:11:38 +00:00
|
|
|
R_API RList* r_bin_get_relocs(RBin *bin);
|
2010-03-10 10:01:38 +00:00
|
|
|
R_API RList* r_bin_get_sections(RBin *bin);
|
2011-10-05 00:38:37 +00:00
|
|
|
R_API RList* /*<RBinClass>*/r_bin_get_classes(RBin *bin);
|
2012-11-07 09:41:12 +00:00
|
|
|
|
|
|
|
R_API RBinClass *r_bin_class_get (RBin *bin, const char *name);
|
|
|
|
R_API RBinClass *r_bin_class_new (RBin *bin, const char *name, const char *super, int view);
|
|
|
|
R_API int r_bin_class_add_method (RBin *bin, const char *classname, const char *name, int nargs);
|
|
|
|
R_API void r_bin_class_add_field (RBin *bin, const char *classname, const char *name);
|
|
|
|
|
2010-02-23 17:26:02 +00:00
|
|
|
R_API RBinSection* r_bin_get_section_at(RBin *bin, ut64 off, int va);
|
2010-03-10 10:01:38 +00:00
|
|
|
R_API RList* r_bin_get_strings(RBin *bin);
|
|
|
|
R_API RList* r_bin_get_symbols(RBin *bin);
|
2010-03-13 19:25:03 +00:00
|
|
|
R_API int r_bin_is_big_endian (RBin *bin);
|
|
|
|
R_API int r_bin_is_stripped (RBin *bin);
|
|
|
|
R_API int r_bin_is_static (RBin *bin);
|
|
|
|
R_API int r_bin_has_dbg_linenums (RBin *bin);
|
|
|
|
R_API int r_bin_has_dbg_syms (RBin *bin);
|
|
|
|
R_API int r_bin_has_dbg_relocs (RBin *bin);
|
2010-02-07 12:17:51 +00:00
|
|
|
R_API RBin* r_bin_new();
|
2011-07-25 19:10:25 +00:00
|
|
|
R_API int r_bin_use_arch(RBin *bin, const char *arch, int bits, const char *name);
|
|
|
|
R_API int r_bin_select(RBin *bin, const char *arch, int bits, const char *name);
|
|
|
|
R_API int r_bin_select_idx(RBin *bin, int idx);
|
2010-10-04 01:46:58 +00:00
|
|
|
R_API void r_bin_list_archs(RBin *bin);
|
2010-02-07 12:17:51 +00:00
|
|
|
R_API void r_bin_set_user_ptr(RBin *bin, void *user);
|
2011-07-25 19:10:25 +00:00
|
|
|
R_API RBuffer *r_bin_create (RBin *bin, const ut8 *code, int codelen, const ut8 *data, int datalen);
|
2010-02-22 03:47:19 +00:00
|
|
|
/* bin_meta.c */
|
2010-02-22 03:30:34 +00:00
|
|
|
R_API int r_bin_meta_get_line(RBin *bin, ut64 addr, char *file, int len, int *line);
|
2010-03-19 00:45:52 +00:00
|
|
|
R_API char *r_bin_meta_get_source_line(RBin *bin, ut64 addr);
|
2011-11-21 23:59:20 +00:00
|
|
|
R_API ut64 r_bin_get_offset (RBin *bin);
|
2010-03-08 18:40:21 +00:00
|
|
|
/* bin_write.c */
|
2010-03-11 01:14:34 +00:00
|
|
|
R_API ut64 r_bin_wr_scn_resize(RBin *bin, const char *name, ut64 size);
|
2010-03-16 01:24:12 +00:00
|
|
|
R_API int r_bin_wr_rpath_del(RBin *bin);
|
2010-03-11 01:14:34 +00:00
|
|
|
R_API int r_bin_wr_output(RBin *bin, const char *filename);
|
2012-07-12 00:47:04 +00:00
|
|
|
R_API int r_bin_dwarf_parse_info(RBin *a);
|
2012-08-14 00:37:42 +00:00
|
|
|
R_API RList *r_bin_dwarf_parse_line(RBin *a);
|
2011-02-23 19:53:56 +00:00
|
|
|
|
2010-05-27 17:58:54 +00:00
|
|
|
/* plugin pointers */
|
2011-09-02 14:45:39 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_any;
|
2011-05-12 07:52:40 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_fs;
|
2010-05-27 17:58:54 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_elf;
|
|
|
|
extern RBinPlugin r_bin_plugin_elf64;
|
2011-11-12 03:51:45 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_p9;
|
2010-05-27 17:58:54 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_pe;
|
2012-03-07 00:34:57 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_mz;
|
2010-05-27 17:58:54 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_pe64;
|
2013-06-09 00:11:17 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_bios;
|
2013-03-02 23:09:51 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_te;
|
2010-05-27 17:58:54 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_mach0;
|
|
|
|
extern RBinPlugin r_bin_plugin_mach064;
|
|
|
|
extern RBinPlugin r_bin_plugin_java;
|
2011-04-28 00:09:43 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_dex;
|
2010-05-27 17:58:54 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_dummy;
|
2012-11-30 00:06:30 +00:00
|
|
|
extern RBinPlugin r_bin_plugin_rar;
|
2012-09-07 01:26:38 +00:00
|
|
|
extern RBinXtrPlugin r_bin_xtr_plugin_zip;
|
2010-09-24 19:23:13 +00:00
|
|
|
extern RBinXtrPlugin r_bin_xtr_plugin_fatmach0;
|
2010-10-01 02:26:52 +00:00
|
|
|
extern RBinXtrPlugin r_bin_xtr_plugin_dyldcache;
|
2013-06-18 10:09:23 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-05-27 17:58:54 +00:00
|
|
|
#endif
|
2009-02-05 21:08:46 +00:00
|
|
|
#endif
|