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.
|
|
|
#pragma once
|
|
|
|
#include <coff/image.hpp>
|
|
|
|
#include <vector>
|
|
|
|
#include <xtils.hpp>
|
|
|
|
|
|
|
|
#define XED_ENCODER
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#include <xed-decode.h>
|
|
|
|
#include <xed-encode.h>
|
|
|
|
#include <xed-interface.h>
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace theo
|
|
|
|
{
|
|
|
|
class iff_t
|
|
|
|
{
|
|
|
|
friend class swapchain_t;
|
|
|
|
|
|
|
|
public:
|
|
|
|
struct section_t
|
|
|
|
{
|
|
|
|
coff::section_header_t header;
|
|
|
|
std::vector< std::pair< std::uint32_t, coff::symbol_t > > symbols;
|
|
|
|
std::vector< xed_decoded_inst_t > instrs;
|
|
|
|
};
|
|
|
|
|
|
|
|
explicit iff_t( coff::image_t *img );
|
|
|
|
std::vector< section_t > sections;
|
|
|
|
|
|
|
|
static std::shared_ptr< theo::iff_t > make( coff::image_t *img )
|
|
|
|
{
|
|
|
|
return std::make_shared< theo::iff_t >( img );
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
void flush();
|
|
|
|
coff::image_t *img;
|
|
|
|
};
|
|
|
|
} // namespace theo
|