common: Rewrite logging based on cut down citra logger (#86)

* common: Rewrite logging based on cut down Citra logger

* code: Misc fixes

* core: Bring back tls handler

* linker: Cleanup

* config: Remove log level

* logging: Enable console output by default

* core: Fix windows build
This commit is contained in:
GPUCode 2024-02-28 00:10:34 +02:00 committed by GitHub
parent b3084646a8
commit 79d6c8a377
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
70 changed files with 3212 additions and 1541 deletions

View file

@ -51,6 +51,7 @@ struct PS4ThreadLocal {
u64 image_size = 0;
u64 handler_virtual_addr = 0;
};
struct DynamicModuleInfo {
void* hash_table = nullptr;
u64 hash_table_size = 0;
@ -97,9 +98,7 @@ struct DynamicModuleInfo {
struct Module {
Loader::Elf elf;
u64 aligned_base_size = 0;
u64 base_virtual_addr = 0; // Base virtual address
Linker* linker = nullptr;
u64 base_virtual_addr = 0;
std::vector<u8> m_dynamic;
std::vector<u8> m_dynamic_data;
@ -116,8 +115,8 @@ public:
Linker();
virtual ~Linker();
Module* LoadModule(const std::string& elf_name);
Module* FindModule(/*u32 id*/);
Module* LoadModule(const std::filesystem::path& elf_name);
Module* FindModule(u32 id = 0);
void LoadModuleToMemory(Module* m);
void LoadDynamicInfo(Module* m);
void LoadSymbols(Module* m);
@ -133,7 +132,7 @@ private:
const ModuleInfo* FindModule(const Module& m, const std::string& id);
const LibraryInfo* FindLibrary(const Module& program, const std::string& id);
std::vector<Module> m_modules;
std::vector<std::unique_ptr<Module>> m_modules;
Loader::SymbolsResolver m_hle_symbols{};
std::mutex m_mutex;
};