move eboot_address to module.h

fixes the non-qt builds and makes more sense to be there anyway
This commit is contained in:
CrazyBloo
2024-08-20 21:48:21 -04:00
parent 2b454644fb
commit e938ecf206
4 changed files with 9 additions and 9 deletions

View File

@@ -11,7 +11,6 @@
#include "core/loader/dwarf.h"
#include "core/memory.h"
#include "core/module.h"
#include "qt_gui/cheats_patches.h"
namespace Core {
@@ -20,6 +19,8 @@ using EntryFunc = PS4_SYSV_ABI int (*)(size_t args, const void* argp, void* para
static u64 LoadOffset = CODE_BASE_OFFSET;
static constexpr u64 CODE_BASE_INCR = 0x010000000u;
uintptr_t g_eboot_address;
static u64 GetAlignedSize(const elf_program_header& phdr) {
return (phdr.p_align != 0 ? (phdr.p_memsz + (phdr.p_align - 1)) & ~(phdr.p_align - 1)
: phdr.p_memsz);
@@ -91,9 +92,9 @@ void Module::LoadModuleToMemory(u32& max_tls_index) {
LoadOffset += CODE_BASE_INCR * (1 + aligned_base_size / CODE_BASE_INCR);
LOG_INFO(Core_Linker, "Loading module {} to {}", name, fmt::ptr(*out_addr));
if (cheats_eboot_address == 0) {
if (g_eboot_address == 0) {
if (name == "eboot") {
cheats_eboot_address = base_virtual_addr;
g_eboot_address = base_virtual_addr;
}
}

View File

@@ -243,4 +243,6 @@ public:
std::vector<u8> rela_bits;
};
extern uintptr_t g_eboot_address;
} // namespace Core