32 #include <spdlog/spdlog.h>
43 #include <coff/archive.hpp>
44 #include <coff/image.hpp>
55 using sym_data_t = std::tuple<coff::image_t*, coff::symbol_t*, std::uint32_t>;
76 std::vector<routine_t>
rtns();
82 std::vector<std::uint8_t>
lib();
88 std::vector<std::vector<std::uint8_t>>
objs();
111 std::optional<recomp::symbol_table_t*>
decompose(std::string& entry_sym);
119 std::uint32_t ext_used_syms(
const std::string&& entry_sym);
126 std::optional<sym_data_t> get_symbol(
const std::string_view& name);
136 std::uint32_t next_sym(coff::image_t* img,
137 coff::section_header_t* hdr,
140 const std::vector<std::uint8_t> m_lib;
141 std::vector<std::vector<std::uint8_t>> m_objs;
142 std::vector<routine_t> m_rtns;
143 std::set<sym_data_t> m_used_syms;
144 std::set<coff::image_t*> m_processed_objs;
145 std::map<coff::section_header_t*, std::size_t> m_scn_hash_tbl;
146 std::map<std::size_t, std::vector<sym_data_t>> m_lookup_tbl;
the main decomposition class which is responsible for breaking down lib file into coff files,...
std::vector< routine_t > rtns()
gets all of the routine objects.
std::vector< std::uint8_t > lib()
gets a vector of bytes consisting of the lib file.
decomp_t(std::vector< std::uint8_t > &lib, recomp::symbol_table_t *syms)
the explicit constructor for decomp_t
std::map< coff::section_header_t *, std::size_t > & scn_hash_tbl()
gets the section hash table section header --> hash of the section header ptr.
recomp::symbol_table_t * syms()
gets the symbol table.
std::optional< recomp::symbol_table_t * > decompose(std::string &entry_sym)
decomposes (extracts) the symbols used. this function determines all used symbols given the entry poi...
std::vector< std::vector< std::uint8_t > > objs()
gets all the obj files as a vector of a vector of bytes.
this class is a high level wrapper for a hashmap that contains decomp::symbol_t values....
the namespace that contains all of the decomposition related code.
std::tuple< coff::image_t *, coff::symbol_t *, std::uint32_t > sym_data_t
meta symbol data. consists of the coff image which contains the coff symbol, the coff symbol itself,...