You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1021 B

#include <coff/archive.hpp>
#include <llodctor/llodctor_base.hpp>
namespace llo::s1
{
class dctor_lib_t : public dctor_base_t
{
public:
explicit dctor_lib_t( const std::vector< std::uint8_t > &image,
llo::s1::symbol_loader_base_t *symbol_loader = nullptr )
: dctor_base_t( image, symbol_loader )
{
const auto lib_header = reinterpret_cast< const ar::header_t * >( image.data() );
auto lib_entry = &lib_header->first_entry;
ar::entry_t *string_table = nullptr;
do
{
// TODO...
// BROKE!
if ( lib_entry->is_string_table() )
string_table = ( ar::entry_t * )lib_entry;
std::printf( "> object name = %s\n", lib_entry->to_string( string_table ) );
} while ( ( lib_entry = lib_header->first_entry.next() ) );
}
void generate( lloiff_t &iff ) override;
};
} // namespace llo::s1