ReXGlue SDK
Loading...
Searching...
No Matches
symbol_map.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <cstdint>
14#include <span>
15#include <string>
16#include <filesystem>
17#include <string_view>
18#include <vector>
19
20#include <rex/types.h>
21#include <rex/platform.h>
22#include <rex/result.h>
23
24namespace rex::kernel {
25
26enum class BinarySymbolType : u8 { kFunction, kData, kImport, kUnknown };
27
29 std::string name;
30 u32 address = 0;
31 u32 size = 0;
32 BinarySymbolType type = BinarySymbolType::kUnknown;
33};
34
36 std::string name;
38 u32 virtual_size = 0;
39 const u8* host_data = nullptr;
40 bool executable = false;
41 bool writable = false;
42};
43
44} // namespace rex::kernel
45
46namespace rex::kernel {
47
50 u32 base_address = 0;
51
53 bool functions_only = false;
54
56 std::string_view prefix_filter;
57};
58
67 const std::filesystem::path& map_path, const MapParseOptions& options = {});
68
76 std::string_view map_data, const MapParseOptions& options = {});
77
78} // namespace rex::kernel
Definition export.h:24
Result< std::vector< BinarySymbol > > ParseNmMap(const std::filesystem::path &map_path, const MapParseOptions &options={})
@ kFunction
Definition export.h:33
Result< std::vector< BinarySymbol > > ParseNmMapString(std::string_view map_data, const MapParseOptions &options={})
std::expected< T, Error > Result
Definition result.h:98
Platform flags, packing macros and export markers.
#define REX_KERNEL_API
Definition platform.h:297
Definition symbol_map.h:35
u32 virtual_address
Definition symbol_map.h:37
const u8 * host_data
Definition symbol_map.h:39
Definition symbol_map.h:28
Definition symbol_map.h:48
bool functions_only
Definition symbol_map.h:53
u32 base_address
Definition symbol_map.h:50
std::string_view prefix_filter
Definition symbol_map.h:56
Integer types, byte order wrappers and size literals.