mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-07 11:13:15 +00:00
core: Properly implement TLS (#164)
* core: Split module code from linker * linker: Properly implement thread local storage * kernel: Fix a few memory functions * kernel: Implement module loading * Now it's easy to do anyway with new module rework
This commit is contained in:
parent
7d61b7ab9b
commit
728249f58d
26 changed files with 1047 additions and 823 deletions
|
@ -3,8 +3,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include "common/types.h"
|
||||
|
||||
|
@ -20,6 +21,7 @@ enum class SymbolType {
|
|||
|
||||
struct SymbolRecord {
|
||||
std::string name;
|
||||
std::string nid_name;
|
||||
u64 virtual_address;
|
||||
};
|
||||
|
||||
|
@ -42,6 +44,16 @@ public:
|
|||
void AddSymbol(const SymbolResolver& s, u64 virtual_addr);
|
||||
const SymbolRecord* FindSymbol(const SymbolResolver& s) const;
|
||||
|
||||
void DebugDump(const std::filesystem::path& file_name);
|
||||
|
||||
std::span<const SymbolRecord> GetSymbols() const {
|
||||
return m_symbols;
|
||||
}
|
||||
|
||||
size_t GetSize() const noexcept {
|
||||
return m_symbols.size();
|
||||
}
|
||||
|
||||
static std::string GenerateName(const SymbolResolver& s);
|
||||
|
||||
static std::string_view SymbolTypeToS(SymbolType sym_type) {
|
||||
|
@ -59,9 +71,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void DebugDump(const std::filesystem::path& file_name);
|
||||
int GetSize();
|
||||
|
||||
private:
|
||||
std::vector<SymbolRecord> m_symbols;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue