17 #define RBINLISTFREE(x) \
23 #define ARCHS_KEY "archs"
76 memset(opt, 0,
sizeof(*opt));
78 opt->obj_opts.loadaddr = loadaddr;
80 opt->obj_opts.elf_load_sections =
true;
160 return sdb_fmt(
"%s_%d",
s->name,
s->dup_count);
212 opt->pluginname =
NULL;
227 opt.obj_opts.elf_load_sections = elf_load_sections;
228 opt.obj_opts.elf_checks_sections = elf_checks_sections;
229 opt.obj_opts.elf_checks_segments = elf_checks_segments;
230 opt.obj_opts.big_endian = big_endian;
231 opt.filename = bf->
file;
244 bin->file = opt->filename;
245 if (opt->obj_opts.loadaddr ==
UT64_MAX) {
246 opt->obj_opts.loadaddr = 0;
250 if (
bin->use_xtr && !opt->pluginname) {
254 rz_list_foreach (
bin->binxtrs, it, xtr) {
263 bin->file,
buf, &opt->obj_opts,
264 opt->xtr_idx, opt->
fd);
273 &opt->obj_opts, opt->
fd, opt->pluginname);
290 bool is_debugger = iob->
fd_is_dbg(io, opt->fd);
292 if (opt->obj_opts.loadaddr ==
UT64_MAX) {
293 opt->obj_opts.loadaddr = 0;
319 if (!is_debugger && (opt->obj_opts.loadaddr != 0 || opt->sz !=
rz_buf_size(
buf))) {
321 }
else if (is_debugger && opt->obj_opts.baseaddr !=
UT64_MAX && opt->obj_opts.baseaddr != 0) {
329 opt->filename =
fname;
341 rz_list_foreach (
bin->plugins, it, plugin) {
355 rz_list_foreach (
bin->plugins, it, plugin) {
373 rz_list_foreach (
bin->plugins, it, plugin) {
390 rz_list_foreach (
bin->binxtrs, it, xtr) {
410 rz_list_foreach (
bin->plugins, it, plugin) {
431 rz_list_foreach (
bin->binxtrs, it, xtr) {
463 bin->cb_printf(
"%s\n", bp->
name);
471 bin->cb_printf(
"Name: %s\n", bp->
name);
472 bin->cb_printf(
"Description: %s\n", bp->
desc);
480 bin->cb_printf(
"Author: %s\n", bp->
author);
488 bin->cb_printf(
"%s\n", bx->
name);
502 bin->cb_printf(
"Name: %s\n", bx->
name);
503 bin->cb_printf(
"Description: %s\n", bx->
desc);
517 rz_list_foreach (
bin->plugins, it, bp) {
523 rz_list_foreach (
bin->binxtrs, it, bx) {
560 }
else if (file_baddr !=
UT64_MAX) {
650 rz_list_foreach_prev(o->maps,
iter,
map) {
725 if (!
bin->demangler) {
729 goto trashbin_demangler;
733 goto trashbin_constpool;
743 bin->want_dbginfo =
true;
762 if (!static_xtr_plugin) {
763 goto trashbin_binxtrs;
767 free(static_xtr_plugin);
799 if (xtr_data && !xtr_data->
loaded) {
820 if (binfile &&
name) {
864 const ut8 *data,
int datalen,
871 RZ_LOG_WARN(
"Cannot find RzBin plugin named '%s'.\n",
p);
875 RZ_LOG_WARN(
"RzBin plugin '%s' does not implement \"create\" method.\n",
p);
878 codelen =
RZ_MAX(codelen, 0);
879 datalen =
RZ_MAX(datalen, 0);
880 return plugin->
create(
bin,
code, codelen, data, datalen, opt);
892 return o ? o->
size : 0;
903 return binfile ? binfile->
o :
NULL;
931 bin->filter_rules = rules;
964 return compact ?
"c" :
"class";
966 return compact ?
"s" :
"static";
968 return compact ?
"p" :
"public";
970 return compact ?
"P" :
"private";
972 return compact ?
"r" :
"protected";
974 return compact ?
"i" :
"internal";
976 return compact ?
"o" :
"open";
978 return compact ?
"e" :
"fileprivate";
980 return compact ?
"f" :
"final";
982 return compact ?
"v" :
"virtual";
984 return compact ?
"k" :
"const";
986 return compact ?
"m" :
"mutating";
988 return compact ?
"a" :
"abstract";
990 return compact ?
"y" :
"synchronized";
992 return compact ?
"n" :
"native";
994 return compact ?
"b" :
"bridge";
996 return compact ?
"g" :
"varargs";
998 return compact ?
"h" :
"synthetic";
1000 return compact ?
"t" :
"strict";
1002 return compact ?
"A" :
"miranda";
1004 return compact ?
"C" :
"constructor";
1006 return compact ?
"Y" :
"declared_synchronized";
1042 if (!binfile->o || !binfile->o->plugin || !binfile->o->plugin->sections) {
1055 rz_list_foreach (
sections, it, sec) {
1092 rz_list_foreach (
maps, it,
map) {
1163 rz_list_foreach (
bin->binfiles, it, bf) {
1203 rz_list_foreach (
bin->plugins,
iter, bp) {
1220 rz_list_foreach (
bin->binxtrs,
iter, bp) {
1229 static char *bin_demangle_cxx(
RzBinFile *bf,
const char *symbol,
ut64 vaddr) {
1234 char *sign = (
char *)strchr(
out,
'(');
1241 char *method_name =
NULL;
1243 ptr = strstr(
str,
"::");
1244 if (!ptr || ptr > sign) {
1258 if (sym->
vaddr != 0 && sym->
vaddr != vaddr) {
1261 if (sym->
vaddr == 0) {
1269 static char *bin_demangle_rust(
RzBinFile *binfile,
const char *symbol,
ut64 vaddr) {
1271 if (!(
str = bin_demangle_cxx(binfile, symbol, vaddr))) {
1309 const char *lib =
NULL;
1310 if (!strncmp(symbol,
"reloc.", 6)) {
1313 if (!strncmp(symbol,
"sym.", 4)) {
1316 if (!strncmp(symbol,
"imp.", 4)) {
1319 if (!strncmp(symbol,
"target.", 7)) {
1324 rz_list_foreach (o->
libs,
iter, lib) {
1325 size_t len = strlen(lib);
1328 if (*symbol ==
'_') {
1338 size_t len = strlen(
bin->file);
1342 if (*symbol ==
'_') {
1352 if (!strncmp(symbol,
"__", 2)) {
1353 if (symbol[2] ==
'T') {
1369 char *demangled =
NULL;
1390 if (
libs && demangled && lib) {
RZ_API bool rz_bin_file_set_cur_binfile(RzBin *bin, RzBinFile *bf)
RZ_API RzBinSymbol * rz_bin_file_add_method(RzBinFile *bf, const char *klass, const char *method, int nargs)
RZ_IPI RzBinFile * rz_bin_file_new_from_buffer(RzBin *bin, const char *file, RzBuffer *buf, RzBinObjectLoadOptions *opts, int fd, const char *pluginname)
RZ_IPI bool rz_bin_file_set_obj(RzBin *bin, RzBinFile *bf, RzBinObject *obj)
RZ_API RzBinFile * rz_bin_file_find_by_id(RzBin *bin, ut32 bf_id)
RZ_API bool rz_bin_file_delete(RzBin *bin, RzBinFile *bf)
RZ_API RzBinFile * rz_bin_file_find_by_arch_bits(RzBin *bin, const char *arch, int bits)
RZ_API RzBinPlugin * rz_bin_file_cur_plugin(RzBinFile *bf)
RZ_API bool rz_bin_file_object_new_from_xtr_data(RzBin *bin, RzBinFile *bf, RzBinObjectLoadOptions *opts, RzBinXtrData *data)
RZ_IPI RzBinFile * rz_bin_file_xtr_load_buffer(RzBin *bin, RzBinXtrPlugin *xtr, const char *filename, RzBuffer *buf, RzBinObjectLoadOptions *obj_opts, int idx, int fd)
RZ_API ut64 rz_bin_file_get_baddr(RzBinFile *bf)
RZ_API void rz_bin_info_free(RzBinInfo *rb)
RZ_API const char * rz_bin_entry_type_string(int etype)
RZ_DEPRECATE RZ_API RZ_BORROW RzBinInfo * rz_bin_get_info(RzBin *bin)
RZ_API RzBinImport * rz_bin_import_clone(RzBinImport *o)
RZ_API RzBin * rz_bin_new(void)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_entries(RZ_NONNULL RzBin *bin)
RZ_API ut64 rz_bin_get_laddr(RzBin *bin)
RZ_API RzBinObject * rz_bin_cur_object(RzBin *bin)
RZ_API bool rz_bin_plugin_add(RzBin *bin, RzBinPlugin *foo)
static void __printXtrPluginDetails(RzBin *bin, RzBinXtrPlugin *bx, int json)
RZ_API void rz_bin_xtrdata_free(void *data_)
RZ_API RzBinSymbol * rz_bin_symbol_new(const char *name, ut64 paddr, ut64 vaddr)
RZ_API ut64 rz_bin_get_size(RzBin *bin)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_imports(RZ_NONNULL RzBin *bin)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_mem(RZ_NONNULL RzBin *bin)
RZ_API void rz_bin_load_filter(RzBin *bin, ut64 rules)
RZ_API RzBinSection * rz_bin_section_new(const char *name)
RZ_API void rz_bin_file_hash_free(RzBinFileHash *fhash)
RZ_API RZ_OWN RzList * rz_bin_section_flag_to_list(RzBin *bin, ut64 flag)
Converts the RzBinSection flags to a list of string representations.
RZ_API void rz_bin_bind(RzBin *bin, RzBinBind *b)
RZ_API RzBinPlugin * rz_bin_get_binplugin_by_buffer(RzBin *bin, RzBuffer *buf)
RZ_API void rz_bin_set_user_ptr(RzBin *bin, void *user)
RZ_API RzBinFile * rz_bin_open_buf(RzBin *bin, RzBuffer *buf, RzBinOptions *opt)
RZ_API void rz_bin_symbol_free(RzBinSymbol *sym)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_classes(RZ_NONNULL RzBin *bin)
RZ_API RzBinFile * rz_bin_file_at(RzBin *bin, ut64 at)
RZ_API const char * rz_bin_symbol_name(RzBinSymbol *s)
RZ_API bool rz_bin_list_plugin(RzBin *bin, const char *name, PJ *pj, int json)
static bool rz_bin_print_plugin_details(RzBin *bin, RzBinPlugin *bp, PJ *pj, int json)
RZ_API void rz_bin_map_free(RzBinMap *map)
RZ_API void rz_bin_string_free(void *_str)
RZ_API void rz_bin_field_free(RzBinField *field)
RZ_IPI RzBinPlugin * rz_bin_get_binplugin_by_name(RzBin *bin, const char *name)
RZ_IPI RzBinPlugin * rz_bin_get_binplugin_by_filename(RzBin *bin)
RZ_API const RzBinPlugin * rz_bin_plugin_get(RZ_NONNULL RzBin *bin, RZ_NONNULL const char *name)
Get a RzBinPlugin by name.
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_libs(RZ_NONNULL RzBin *bin)
RZ_API RzBinFile * rz_bin_open_io(RzBin *bin, RzBinOptions *opt)
RZ_DEPRECATE RZ_API int rz_bin_is_static(RZ_NONNULL RzBin *bin)
RZ_API RZ_BORROW RzBinMap * rz_bin_object_get_map_at(RZ_NONNULL RzBinObject *o, ut64 off, bool va)
Find the last binary map at offset off .
RZ_API void rz_bin_import_free(RzBinImport *imp)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_symbols(RZ_NONNULL RzBin *bin)
RZ_API void rz_bin_resource_free(RzBinResource *res)
RZ_API void rz_bin_arch_options_init(RzBinArchOptions *opt, const char *arch, int bits)
static RzBinXtrPlugin * bin_xtr_static_plugins[]
RZ_API const RzBinXtrPlugin * rz_bin_xtrplugin_get(RZ_NONNULL RzBin *bin, RZ_NONNULL const char *name)
Get a RzBinXtrPlugin by name.
static RzBinPlugin * bin_static_plugins[]
RZ_API RzList * rz_bin_sections_of_maps(RzList *maps)
Create a list of RzBinSection from RzBinMaps.
RZ_API bool rz_bin_select_bfid(RzBin *bin, ut32 bf_id)
RZ_API ut64 rz_bin_get_baddr(RzBin *bin)
RZ_API RZ_OWN RzPVector * rz_bin_object_get_maps_at(RzBinObject *o, ut64 off, bool va)
Find all binary maps at offset off .
RZ_API void rz_bin_section_free(RzBinSection *bs)
RZ_API void rz_bin_force_plugin(RzBin *bin, const char *name)
RZ_API RZ_BORROW RzBinSection * rz_bin_get_section_at(RzBinObject *o, ut64 off, int va)
Find the binary section at offset off.
RZ_API RzBuffer * rz_bin_create(RzBin *bin, const char *p, const ut8 *code, int codelen, const ut8 *data, int datalen, RzBinArchOptions *opt)
RZ_API RzBinXtrData * rz_bin_xtrdata_new(RzBuffer *buf, ut64 offset, ut64 size, ut32 file_count, RzBinXtrMetadata *metadata)
RZ_API bool rz_bin_xtr_add(RzBin *bin, RzBinXtrPlugin *foo)
RZ_API RZ_OWN char * rz_bin_demangle(RZ_NULLABLE RzBinFile *bf, RZ_NULLABLE const char *language, RZ_NULLABLE const char *symbol, ut64 vaddr, bool libs)
Demangles a symbol based on the language or the RzBinFile data.
static RzBinSection * __get_vsection_at(RzBin *bin, ut64 vaddr)
RZ_API RZ_OWN RzList * rz_bin_maps_of_file_sections(RZ_NONNULL RzBinFile *binfile)
Create a list of RzBinMap from RzBinSections queried from the given file.
RZ_API RzBinFile * rz_bin_reload(RzBin *bin, RzBinFile *bf, ut64 baseaddr)
static char * __getname(RzBin *bin, int type, int idx)
RZ_API RzBinTrycatch * rz_bin_trycatch_new(ut64 source, ut64 from, ut64 to, ut64 handler, ut64 filter)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_strings(RZ_NONNULL RzBin *bin)
RZ_API void rz_bin_options_init(RzBinOptions *opt, int fd, ut64 baseaddr, ut64 loadaddr, bool patch_relocs)
static void rz_bin_plugin_free(RzBinPlugin *p)
RZ_API RzBinField * rz_bin_field_new(ut64 paddr, ut64 vaddr, int size, const char *name, const char *comment, const char *format, bool format_named)
RZ_IPI void rz_bin_file_free(void *_bf)
RZ_API RzBinFile * rz_bin_open(RzBin *bin, const char *file, RzBinOptions *opt)
RZ_API RzBinFile * rz_bin_cur(RzBin *bin)
RZ_API void rz_bin_virtual_file_free(RzBinVirtualFile *vfile)
RZ_API const char * rz_bin_get_meth_flag_string(ut64 flag, bool compact)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_sections(RZ_NONNULL RzBin *bin)
RZ_API int rz_bin_select_object(RzBinFile *binfile, const char *arch, int bits, const char *name)
RZ_API bool rz_bin_select(RzBin *bin, const char *arch, int bits, const char *name)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_fields(RZ_NONNULL RzBin *bin)
RZ_API void rz_bin_free(RzBin *bin)
RZ_API bool rz_bin_use_arch(RzBin *bin, const char *arch, int bits, const char *name)
RZ_API void rz_bin_set_baddr(RzBin *bin, ut64 baddr)
RZ_API RZ_OWN char * rz_bin_section_type_to_string(RzBin *bin, int type)
Converts the RzBinSection type to the string representation.
RZ_API void rz_bin_reloc_free(RzBinReloc *reloc)
RZ_IPI RzBinXtrPlugin * rz_bin_get_xtrplugin_by_name(RzBin *bin, const char *name)
static ut64 __getoffset(RzBin *bin, int type, int idx)
RZ_API void rz_bin_trycatch_free(RzBinTrycatch *tc)
static ut64 baddr(RzBinFile *bf)
static RzList * maps(RzBinFile *bf)
static RzList * libs(RzBinFile *bf)
RZ_API RzBinLanguage rz_bin_language_to_id(const char *language)
returns the language identifier based on the given lang name
RZ_API const char * rz_bin_language_to_string(RzBinLanguage language)
returns the language name based on the given language identifier
RzList * sections(RzBinFile *bf)
int bits(struct state *s, int need)
const lzma_allocator const uint8_t size_t uint8_t * out
RZ_API const RzBinInfo * rz_bin_object_get_info(RZ_NONNULL RzBinObject *obj)
Get the RzBinInfo of the binary object.
RZ_API const RzList * rz_bin_object_get_entries(RZ_NONNULL RzBinObject *obj)
Get list of RzBinAddr representing the entry points of the binary object.
RZ_API const RzList * rz_bin_object_get_imports(RZ_NONNULL RzBinObject *obj)
Get list of RzBinImport representing the imports of the binary object.
RZ_API const RzList * rz_bin_object_get_fields(RZ_NONNULL RzBinObject *obj)
Get list of RzBinField representing the fields of the binary object.
RZ_API const RzList * rz_bin_object_get_libs(RZ_NONNULL RzBinObject *obj)
Get list of char* representing the libraries used by the binary object.
RZ_API const RzList * rz_bin_object_get_sections_all(RZ_NONNULL RzBinObject *obj)
Get list of RzBinSection representing both the sections and the segments of the binary object.
RZ_API ut64 rz_bin_object_addr_with_base(RzBinObject *o, ut64 addr)
Put the given address on top of o's base address.
RZ_API const RzList * rz_bin_object_get_strings(RZ_NONNULL RzBinObject *obj)
Get list of RzBinString representing the strings identified in the binary object.
RZ_API const RzList * rz_bin_object_get_mem(RZ_NONNULL RzBinObject *obj)
Get list of RzBinMem representing the memory regions identified in the binary object.
RZ_API const RzList * rz_bin_object_get_symbols(RZ_NONNULL RzBinObject *obj)
Get list of RzBinSymbol representing the symbols in the binary object.
RZ_IPI RzBinObject * rz_bin_object_find_by_arch_bits(RzBinFile *bf, const char *arch, int bits, const char *name)
RZ_API bool rz_bin_object_is_static(RZ_NONNULL RzBinObject *obj)
Return true if the binary object obj is detected as statically compiled.
#define RZ_BIN_STATIC_PLUGINS
#define RZ_BIN_XTR_STATIC_PLUGINS
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
size_t map(int syms, int left, int len)
RZ_API char * sdb_fmt(const char *fmt,...)
RZ_API void rz_hash_free(RzHash *rh)
RZ_API RzHash * rz_hash_new(void)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API const KEY_TYPE bool * found
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
RZ_API RZ_OWN char * rz_demangler_cxx(RZ_NONNULL const char *symbol)
Demangles c++ symbols.
RZ_API RZ_OWN char * rz_demangler_objc(RZ_NONNULL const char *symbol)
Demangles objc symbols.
RZ_API RZ_OWN RzDemangler * rz_demangler_new(void)
Initializes the plugin list and returns a RzDemangler struct.
RZ_API RZ_OWN char * rz_demangler_msvc(RZ_NONNULL const char *symbol)
Demangles microsft vc symbols.
RZ_API RZ_OWN char * rz_demangler_java(RZ_NULLABLE const char *symbol)
Demangles java symbols.
RZ_API RZ_OWN char * rz_demangler_rust(RZ_NONNULL const char *symbol)
Demangles rust symbols.
RZ_API void rz_demangler_free(RZ_NULLABLE RzDemangler *dem)
Frees the RzDemangler struct.
RZ_API bool rz_demangler_resolve(RZ_NONNULL RzDemangler *dem, RZ_NULLABLE const char *symbol, RZ_NONNULL const char *language, RZ_NONNULL RZ_OWN char **output)
Resolves a symbol based on its language and return an output that needs to be freed.
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API RZ_BORROW void * rz_list_get_n(RZ_NONNULL const RzList *list, ut32 n)
Returns the N-th element of the list.
RZ_API RZ_BORROW RzListIter * rz_list_push(RZ_NONNULL RzList *list, void *item)
Alias for rz_list_append.
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
RZ_API void MACH0_() patch_relocs(RzBinFile *bf, struct MACH0_(obj_t) *obj)
Patching of external relocs in a sparse overlay buffer.
static bool filter(RzParse *p, ut64 addr, RzFlag *f, RzAnalysisHint *hint, char *data, char *str, int len, bool big_endian)
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
#define RZ_BIN_METH_INTERNAL
@ RZ_BIN_LANGUAGE_UNKNOWN
#define RZ_BIN_METH_VIRTUAL
#define RZ_BIN_METH_CLASS
#define RZ_BIN_ENTRY_TYPE_PREINIT
#define RZ_BIN_METH_CONSTRUCTOR
#define RZ_BIN_METH_FILEPRIVATE
#define RZ_BIN_METH_SYNCHRONIZED
#define RZ_BIN_LANGUAGE_MASK(x)
#define RZ_BIN_ENTRY_TYPE_TLS
#define RZ_BIN_METH_PUBLIC
#define RZ_BIN_METH_VARARGS
#define RZ_BIN_METH_SYNTHETIC
#define RZ_BIN_METH_STRICT
#define RZ_BIN_ENTRY_TYPE_FINI
#define RZ_BIN_METH_ABSTRACT
#define RZ_BIN_ENTRY_TYPE_INIT
#define RZ_BIN_METH_DECLARED_SYNCHRONIZED
#define RZ_BIN_METH_MUTATING
#define RZ_BIN_METH_FINAL
#define RZ_BIN_METH_MIRANDA
#define RZ_BIN_ENTRY_TYPE_PROGRAM
#define RZ_BIN_METH_CONST
#define RZ_BIN_METH_BRIDGE
#define RZ_BIN_METH_STATIC
#define RZ_BIN_METH_PRIVATE
#define RZ_BIN_METH_PROTECTED
#define RZ_BIN_METH_NATIVE
#define RZ_BIN_ENTRY_TYPE_MAIN
RZ_API st64 rz_buf_seek(RZ_NONNULL RzBuffer *b, st64 addr, int whence)
Modify the current cursor position in the buffer.
RZ_API RzBuffer * rz_buf_ref(RzBuffer *b)
Increment the reference count of the buffer.
RZ_API RZ_OWN RzBuffer * rz_buf_new_with_io_fd(RZ_NONNULL void *iob, int fd)
Creates a new buffer wrapping a file descriptor accessed through RzIOBind.
RZ_API void rz_buf_free(RzBuffer *b)
Free all internal data hold by the buffer and the buffer.
RZ_API RZ_OWN RzBuffer * rz_buf_new_slice(RzBuffer *b, ut64 offset, ut64 size)
Creates a new buffer from a slice of another buffer.
RZ_API ut64 rz_buf_size(RZ_NONNULL RzBuffer *b)
Return the size of the buffer.
RZ_API RZ_OWN RzBuffer * rz_buf_new_file(const char *file, int perm, int mode)
Creates a new buffer from a file.
RZ_API void rz_event_free(RzEvent *ev)
RZ_API RzEvent * rz_event_new(void *user)
RZ_API bool rz_id_storage_set(RzIDStorage *storage, void *data, ut32 id)
RZ_API RzIDStorage * rz_id_storage_new(ut32 start_id, ut32 last_id)
RZ_API void rz_id_storage_free(RzIDStorage *storage)
void(* RzListFree)(void *ptr)
#define RZ_LOG_INFO(fmtstr,...)
#define RZ_LOG_WARN(fmtstr,...)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API void * rz_mem_dup(const void *s, int l)
RZ_API PJ * pj_end(PJ *j)
RZ_API const char * pj_string(PJ *pj)
RZ_API void pj_free(PJ *j)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
#define RZ_STR_ISEMPTY(x)
RZ_API int rz_str_cmp(const char *dst, const char *orig, int len)
RZ_API int rz_str_ncasecmp(const char *dst, const char *orig, size_t n)
RZ_API void rz_str_constpool_fini(RzStrConstPool *pool)
RZ_API bool rz_str_constpool_init(RzStrConstPool *pool)
int(* PrintfCallback)(const char *str,...) RZ_PRINTF_CHECK(1
RZ_API RzPVector * rz_pvector_new(RzPVectorFree free)
static void ** rz_pvector_push(RzPVector *vec, void *x)
RZ_API Sdb * sdb_new0(void)
RZ_API bool sdb_free(Sdb *s)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
bool elf_checks_sections
ELF specific, checks or not ELF sections.
bool patch_relocs
ask the bin plugin to fill relocs with valid contents for analysis
ut64 loadaddr
starting physical address to read from the target file
bool elf_load_sections
ELF specific, load or not ELF sections.
bool elf_checks_segments
ELF specific, checks or not ELF sections.
ut64 baseaddr
where the linker maps the binary in memory
bool big_endian
only used for binary formats that do not specify the endian in the file, but need it to load,...
XX curplugin == o->plugin.
int fd
when used in combination with RzIO, this refers to the io fd.
Description of a single memory mapping into virtual memory from a binary.
RzBinObjectLoadOptions opts
struct rz_bin_plugin_t * plugin
bool(* check_buffer)(RzBuffer *buf)
ut64(* baddr)(RzBinFile *bf)
char *(* get_name)(RzBinFile *bf, int type, int idx)
RzList *(* section_flag_to_rzlist)(ut64 flag)
char *(* section_type_to_string)(ut64 type)
RzBuffer *(* create)(RzBin *bin, const ut8 *code, int codelen, const ut8 *data, int datalen, RzBinArchOptions *opt)
ut64(* get_offset)(RzBinFile *bf, int type, int idx)
bool(* check_filename)(const char *filename)
RZ_NONNULL RzBuffer * buf
bool buf_owned
whether buf is owned and freed by this RzBinVirtualFile
RZ_OWN RZ_NONNULL char * name
bool(* check_buffer)(RzBuffer *b)
RzBinXtrData *(* extract_from_bytes)(RzBin *bin, const ut8 *buf, ut64 size, int idx)
RzList *(* extractall_from_bytes)(RzBin *bin, const ut8 *buf, ut64 size)
RzList *(* extractall_from_buffer)(RzBin *bin, RzBuffer *buf)
RzBinXtrData *(* extract_from_buffer)(RzBin *bin, RzBuffer *buf, int idx)
RzIOFdGetName fd_get_name
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static const z80_opcode fd[]