#include "loader/binary.hpp"
#include "loader/elf.hpp"
#include "loader/pe.hpp"
#include <memory>

unique_ptr<Binary> Binary::create(const string& path)
{
    auto elf = make_unique<ELFLoader>();
    if (elf->load(path)) return elf;

    auto pe = make_unique<PELoader>();
    if (pe->load(path)) return pe;

    return nullptr;
}
