Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_bin.h>
Go to the source code of this file.
Macros | |
#define | LANGUAGE_WITH_BLOCKS " with blocks" |
#define | language_apply_blocks_mask(x, b) (b ? (RZ_BIN_LANGUAGE_BLOCKS | (x)) : (x)) |
#define | language_apply_blocks_string(x, b) (RZ_BIN_LANGUAGE_HAS_BLOCKS(x) ? (b LANGUAGE_WITH_BLOCKS) : (b)) |
Functions | |
static bool | check_rust (RzBinSymbol *sym) |
static bool | check_objc (RzBinSymbol *sym) |
static bool | check_dlang (RzBinSymbol *sym) |
static bool | check_swift (RzBinSymbol *sym) |
static bool | check_golang (RzBinSymbol *sym) |
static bool | check_cxx (RzBinSymbol *sym) |
static bool | check_msvc (RzBinSymbol *sym) |
static bool | check_kotlin (RzBinSymbol *sym) |
static bool | check_groovy (RzBinSymbol *sym) |
static bool | check_dart (RzBinSymbol *sym) |
RZ_API RzBinLanguage | rz_bin_language_detect (RzBinFile *binfile) |
Tries to detect which language is used in the binary based on symbols and libraries. More... | |
RZ_API RzBinLanguage | rz_bin_language_to_id (const char *language) |
returns the language identifier based on the given lang name More... | |
RZ_API const char * | rz_bin_language_to_string (RzBinLanguage language) |
returns the language name based on the given language identifier More... | |
Definition at line 9 of file bin_language.c.
#define language_apply_blocks_string | ( | x, | |
b | |||
) | (RZ_BIN_LANGUAGE_HAS_BLOCKS(x) ? (b LANGUAGE_WITH_BLOCKS) : (b)) |
Definition at line 10 of file bin_language.c.
#define LANGUAGE_WITH_BLOCKS " with blocks" |
Definition at line 8 of file bin_language.c.
|
inlinestatic |
Definition at line 37 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 56 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 21 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 32 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 52 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 48 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 44 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 17 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 12 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
|
inlinestatic |
Definition at line 28 of file bin_language.c.
References rz_bin_symbol_t::name.
Referenced by rz_bin_language_detect().
RZ_API RzBinLanguage rz_bin_language_detect | ( | RzBinFile * | binfile | ) |
Tries to detect which language is used in the binary based on symbols and libraries.
Currently this method can detect the language only from bins that are either ELF, PE, Mach-O, Java Class and Dex.
The current supported languages are: c, cxx, dart, dlang, go, groovy, java, kotlin, msvc, objc, rust, swift.
Definition at line 69 of file bin_language.c.
References check_cxx(), check_dart(), check_dlang(), check_golang(), check_groovy(), check_kotlin(), check_msvc(), check_objc(), check_rust(), check_swift(), rz_bin_object_t::imports, info(), rz_bin_object_t::info, rz_bin_info_t::lang, language_apply_blocks_mask, rz_bin_object_t::libs, rz_bin_symbol_t::name, NULL, rz_bin_file_t::o, rz_bin_info_t::rclass, RZ_BIN_LANGUAGE_C, RZ_BIN_LANGUAGE_CXX, RZ_BIN_LANGUAGE_DART, RZ_BIN_LANGUAGE_DLANG, RZ_BIN_LANGUAGE_GO, RZ_BIN_LANGUAGE_GROOVY, RZ_BIN_LANGUAGE_JAVA, RZ_BIN_LANGUAGE_KOTLIN, RZ_BIN_LANGUAGE_MSVC, RZ_BIN_LANGUAGE_OBJC, RZ_BIN_LANGUAGE_RUST, RZ_BIN_LANGUAGE_SWIFT, rz_bin_language_to_id(), RZ_BIN_LANGUAGE_UNKNOWN, rz_return_val_if_fail, rz_bin_object_t::sections, and rz_bin_object_t::symbols.
Referenced by rz_bin_object_set_items().
RZ_API RzBinLanguage rz_bin_language_to_id | ( | const char * | language | ) |
returns the language identifier based on the given lang name
Definition at line 193 of file bin_language.c.
References language_apply_blocks_mask, LANGUAGE_WITH_BLOCKS, RZ_BIN_LANGUAGE_C, RZ_BIN_LANGUAGE_CXX, RZ_BIN_LANGUAGE_DART, RZ_BIN_LANGUAGE_DLANG, RZ_BIN_LANGUAGE_GO, RZ_BIN_LANGUAGE_GROOVY, RZ_BIN_LANGUAGE_JAVA, RZ_BIN_LANGUAGE_KOTLIN, RZ_BIN_LANGUAGE_MSVC, RZ_BIN_LANGUAGE_OBJC, RZ_BIN_LANGUAGE_RUST, RZ_BIN_LANGUAGE_SWIFT, RZ_BIN_LANGUAGE_UNKNOWN, and RZ_STR_ISEMPTY.
Referenced by rz_bin_demangle(), and rz_bin_language_detect().
RZ_API const char* rz_bin_language_to_string | ( | RzBinLanguage | language | ) |
returns the language name based on the given language identifier
Definition at line 229 of file bin_language.c.
References language_apply_blocks_string, NULL, RZ_BIN_LANGUAGE_C, RZ_BIN_LANGUAGE_CXX, RZ_BIN_LANGUAGE_DART, RZ_BIN_LANGUAGE_DLANG, RZ_BIN_LANGUAGE_GO, RZ_BIN_LANGUAGE_GROOVY, RZ_BIN_LANGUAGE_JAVA, RZ_BIN_LANGUAGE_KOTLIN, RZ_BIN_LANGUAGE_MASK, RZ_BIN_LANGUAGE_MSVC, RZ_BIN_LANGUAGE_OBJC, RZ_BIN_LANGUAGE_RUST, and RZ_BIN_LANGUAGE_SWIFT.
Referenced by rz_bin_demangle(), and rz_bin_file_set_obj().