Add bin.relocs config var

This commit is contained in:
pancake 2017-05-17 22:01:27 +02:00
parent a68254d76a
commit 0f6d3bad92
2 changed files with 5 additions and 2 deletions

View File

@ -2853,7 +2853,9 @@ R_API int r_core_bin_info(RCore *core, int action, int mode, int va, RCoreBinFil
if ((action & R_CORE_BIN_ACC_PDB)) ret &= bin_pdb (core, mode);
if ((action & R_CORE_BIN_ACC_ENTRIES)) ret &= bin_entry (core, mode, loadaddr, va);
if ((action & R_CORE_BIN_ACC_SECTIONS)) ret &= bin_sections (core, mode, loadaddr, va, at, name, chksum);
if ((action & R_CORE_BIN_ACC_RELOCS)) ret &= bin_relocs (core, mode, va);
if (r_config_get_i (core->config, "bin.relocs")) {
if ((action & R_CORE_BIN_ACC_RELOCS)) ret &= bin_relocs (core, mode, va);
}
if ((action & R_CORE_BIN_ACC_IMPORTS)) ret &= bin_imports (core, mode, va, name);
if ((action & R_CORE_BIN_ACC_EXPORTS)) ret &= bin_exports (core, mode, loadaddr, va, at, name);
if ((action & R_CORE_BIN_ACC_SYMBOLS)) ret &= bin_symbols (core, mode, loadaddr, va, at, name);

View File

@ -2041,7 +2041,8 @@ R_API int r_core_config_init(RCore *core) {
/* bin */
SETI ("bin.baddr", -1, "Base address of the binary");
SETI ("bin.laddr", 0, "Base address for loading library ('*.so')");
SETPREF ("bin.dbginfo", "true", "Load debug information on startup if available");
SETPREF ("bin.dbginfo", "true", "Load debug information at startup if available");
SETPREF ("bin.relocs", "true", "Load relocs information at startup if available");
SETICB ("bin.minstr", 0, &cb_binminstr, "Minimum string length for r_bin");
SETICB ("bin.maxstr", 0, &cb_binmaxstr, "Maximum string length for r_bin");
SETICB ("bin.maxstrbuf", 1024*1024*10, & cb_binmaxstrbuf, "Maximum size of range to load strings from");