2024-09-28 22:44:27 +06:00

40 lines
666 B
C++

#pragma once
#include <string>
#include <cstdint>
enum SymbolType
{
Symbol_None,
Symbol_Section,
Symbol_Function,
Symbol_Comment,
};
struct Symbol
{
mutable std::string name{};
uint32_t address{};
uint32_t size{};
mutable SymbolType type{};
};
struct SymbolComparer
{
using is_transparent = void;
bool operator()(const Symbol& lhs, size_t rhs) const
{
return lhs.address < rhs;
}
bool operator()(size_t lhs, const Symbol& rhs) const
{
return lhs < rhs.address;
}
bool operator()(const Symbol& lhs, const Symbol& rhs) const
{
return lhs.address < rhs.address;
}
};