renamed inst_split to instruction

3.0
_xeroxz 2 years ago
parent 88bf8873ec
commit b1e74a4466

@ -6,7 +6,7 @@
#include <vector>
namespace theo::decomp {
enum sym_type_t { function, inst_split, data, section };
enum sym_type_t { function, instruction, data, section };
class symbol_t {
public:

@ -3,7 +3,7 @@
namespace theo::obf {
class jcc_rewrite_pass_t : public pass_t {
explicit jcc_rewrite_pass_t() : pass_t(decomp::sym_type_t::inst_split){};
explicit jcc_rewrite_pass_t() : pass_t(decomp::sym_type_t::instruction){};
public:
static jcc_rewrite_pass_t* get();

@ -3,7 +3,7 @@
namespace theo::obf {
class next_inst_pass_t : public pass_t {
explicit next_inst_pass_t() : pass_t(decomp::sym_type_t::inst_split) {
explicit next_inst_pass_t() : pass_t(decomp::sym_type_t::instruction) {
xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b};
xed_decoded_inst_zero_set_mode(&m_tmp_inst, &istate);
xed_decode(&m_tmp_inst, m_type_inst_bytes, sizeof(m_type_inst_bytes));

@ -5,7 +5,7 @@
namespace theo::obf {
class reloc_transform_pass_t : public pass_t {
explicit reloc_transform_pass_t() : pass_t(decomp::sym_type_t::inst_split){};
explicit reloc_transform_pass_t() : pass_t(decomp::sym_type_t::instruction){};
public:
static reloc_transform_pass_t* get();

@ -53,7 +53,7 @@ std::optional<recomp::symbol_table_t*> decomp_t::decompose() {
auto scn = img->get_section(sym->section_index - 1);
auto dcmp_type = scn->name.to_string(img->get_strings()) ==
INSTR_SPLIT_SECTION_NAME
? decomp::sym_type_t::inst_split
? decomp::sym_type_t::instruction
: decomp::sym_type_t::function;
auto fn_size = scn->size_raw_data;
auto fn_bgn =

@ -36,7 +36,7 @@ std::vector<decomp::symbol_t> routine_t::decompose() {
m_sym->value, m_data, m_scn, m_sym, relocs, sym_type_t::function));
break;
}
case inst_split: {
case instruction: {
std::uint32_t offset = 0u;
xed_error_enum_t err;
@ -109,7 +109,7 @@ std::vector<decomp::symbol_t> routine_t::decompose() {
result.push_back(decomp::symbol_t(m_img, new_sym_name, offset,
inst_bytes, m_scn, m_sym, relocs,
sym_type_t::inst_split));
sym_type_t::instruction));
// after creating the symbol and dealing with relocs then print the
// information we have concluded...

@ -15,7 +15,7 @@ void recomp_t::allocate() {
switch (sym.type()) {
case decomp::sym_type_t::section:
case decomp::sym_type_t::function:
case decomp::sym_type_t::inst_split: {
case decomp::sym_type_t::instruction: {
sym.allocated_at(m_allocator(sym.size(), sym.scn()->characteristics));
break;
}
@ -95,7 +95,7 @@ void recomp_t::resolve() {
reloc.offset()) = allocated_at;
break;
}
case decomp::sym_type_t::inst_split: {
case decomp::sym_type_t::instruction: {
auto& transforms = reloc.get_transforms();
std::for_each(
transforms.begin(), transforms.end(),

Loading…
Cancel
Save