24 lines
486 B
C++
24 lines
486 B
C++
#pragma once
|
|
#include <LIEF/LIEF.hpp>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <cstdint>
|
|
|
|
using VADDR = uint64_t;
|
|
|
|
struct GlobalSymtab {
|
|
std::unordered_map<std::string, VADDR> symbols;
|
|
};
|
|
|
|
struct LocalSymtab {
|
|
std::string cu;
|
|
std::unordered_map<std::string, VADDR> symbols;
|
|
};
|
|
|
|
extern GlobalSymtab global_syms;
|
|
extern std::unordered_map<std::string, LocalSymtab> local_syms;
|
|
|
|
bool collect_symbols(const std::unique_ptr<LIEF::ELF::Binary>& bin);
|
|
bool associate_symbols();
|
|
|