shadPS4/src/core/PS4/Loader/SymbolsResolver.h

40 lines
770 B
C
Raw Normal View History

2023-06-26 15:12:19 +00:00
#pragma once
#include <string>
#include <vector>
#include <unordered_map>
#include "../../../types.h"
struct SymbolRecord
{
std::string name;
u64 virtual_address;
};
struct SymbolRes
{
std::string name;
std::string nidName;
std::string library;
u16 library_version;
std::string module;
u08 module_version_major;
u08 module_version_minor;
u32 type;
};
class SymbolsResolver
{
public:
SymbolsResolver() = default;
virtual ~SymbolsResolver() = default;
void AddSymbol(const SymbolRes& s, u64 virtual_addr);
const SymbolRecord* FindSymbol(const SymbolRes& s) const;
static std::string GenerateName(const SymbolRes& s);
2023-06-26 15:12:19 +00:00
private:
std::vector<SymbolRecord> m_symbols;
};