Expose the bin.baddr via env var when running programs

This commit is contained in:
pancake 2024-08-29 18:42:51 +02:00 committed by pancake
parent 8f2d4095d9
commit c6c9f2e804

View File

@ -258,6 +258,7 @@ R_API char *r_core_sysenv_begin(RCore *core, const char *cmd) {
r_sys_setenv ("R2PM_LEGACY", "0");
r_sys_setenv ("R2_OFFSET", r_strf ("%"PFMT64d, core->offset));
r_sys_setenv ("R2_XOFFSET", r_strf ("0x%08"PFMT64x, core->offset));
r_sys_setenv ("R2_BADDR", r_strf ("0x%08"PFMT64x, r_config_get_i (core->config, "bin.baddr")));
r_sys_setenv ("R2_ENDIAN", R_ARCH_CONFIG_IS_BIG_ENDIAN (core->rasm->config)? "big": "little"); // XXX
r_sys_setenv ("R2_BSIZE", r_strf ("%d", core->blocksize));
#if 0