added some comments. preparing to move the routine split code to a

pass...
master
_xeroxz 3 years ago
parent 10f855856a
commit 9b2fb43fb9

@ -126,13 +126,15 @@ std::optional<recomp::symbol_table_t*> decomp_t::decompose(
auto syms = rtn.decompose();
m_syms->put_symbols(syms);
// else the symbol isnt a function and its public or private (some data
// symbols are private)...
} else if (sym->storage_class == coff::storage_class_id::public_symbol ||
sym->storage_class == coff::storage_class_id::private_symbol) {
auto scn = img->get_section(sym->section_index - 1);
auto scn_sym = m_syms->sym_from_hash(m_scn_hash_tbl[scn]);
// if the section doesnt have a symbol then make one and put it into
// the symbol table...
// if the section containing this symbol doesnt have a symbol then make
// one and put it into the symbol table...
//
if (!scn_sym.has_value()) {
auto scn_sym_name =
@ -153,6 +155,8 @@ std::optional<recomp::symbol_table_t*> decomp_t::decompose(
scn->size_raw_data);
}
// extract the relocations needed for this section...
//
std::vector<recomp::reloc_t> relocs;
auto scn_relocs = reinterpret_cast<coff::reloc_t*>(
scn->ptr_relocs + reinterpret_cast<std::uint8_t*>(img));
@ -167,6 +171,8 @@ std::optional<recomp::symbol_table_t*> decomp_t::decompose(
sym_hash, sym_name.data()));
}
// create a new section symbol...
//
decomp::symbol_t new_scn_sym(img, scn_sym_name, 0, scn_data, scn, {},
relocs, sym_type_t::section);

Loading…
Cancel
Save