From b217742c7b177a01926d755742adabbb9a200a6f Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 30 Nov 2013 03:50:43 +0400 Subject: [PATCH] Merge fix --- rpcs3/Emu/System.cpp | 3 +-- rpcs3/Loader/ELF.cpp | 1 - rpcs3/Loader/ELF32.cpp | 2 -- rpcs3/Loader/ELF64.cpp | 2 -- rpcs3/Loader/Loader.cpp | 1 - rpcs3/Loader/Loader.h | 3 --- 6 files changed, 1 insertion(+), 11 deletions(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 3a0fb8b4e8..d81b93dcae 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -185,8 +185,7 @@ void Emulator::Load() ConLog.Write("max addr = 0x%x", l.GetMaxAddr()); thread.SetOffset(Memory.MainMem.GetStartAddr()); Memory.MainMem.Alloc(Memory.MainMem.GetStartAddr() + l.GetMaxAddr(), 0xFFFFED - l.GetMaxAddr()); - //thread.SetEntry(l.GetEntry() - Memory.MainMem.GetStartAddr()); - thread.SetEntry(l.GetTextEntry()); + thread.SetEntry(l.GetEntry() - Memory.MainMem.GetStartAddr()); break; case MACHINE_PPC64: diff --git a/rpcs3/Loader/ELF.cpp b/rpcs3/Loader/ELF.cpp index fd1526e665..d967e4583e 100644 --- a/rpcs3/Loader/ELF.cpp +++ b/rpcs3/Loader/ELF.cpp @@ -27,7 +27,6 @@ bool ELFLoader::LoadInfo() entry = loader->GetEntry(); machine = loader->GetMachine(); - _text_section_offset = loader->GetTextEntry(); return true; } diff --git a/rpcs3/Loader/ELF32.cpp b/rpcs3/Loader/ELF32.cpp index c022de7d58..6684a4f584 100644 --- a/rpcs3/Loader/ELF32.cpp +++ b/rpcs3/Loader/ELF32.cpp @@ -135,8 +135,6 @@ bool ELF32Loader::LoadShdrInfo() name += c; } shdr_name_arr.Add(name); - if(name == ".text") //temporary solution for SPU ELF loading - _text_section_offset = shdr_arr[i].sh_offset; } return true; diff --git a/rpcs3/Loader/ELF64.cpp b/rpcs3/Loader/ELF64.cpp index be47e93813..f0406e0aea 100644 --- a/rpcs3/Loader/ELF64.cpp +++ b/rpcs3/Loader/ELF64.cpp @@ -186,8 +186,6 @@ bool ELF64Loader::LoadShdrInfo(s64 offset) } shdr_name_arr.Add(name); - if(name == ".text") - _text_section_offset = shdr_arr[i].sh_offset; } return true; diff --git a/rpcs3/Loader/Loader.cpp b/rpcs3/Loader/Loader.cpp index 5725ef0dd2..86f8ebd326 100644 --- a/rpcs3/Loader/Loader.cpp +++ b/rpcs3/Loader/Loader.cpp @@ -147,7 +147,6 @@ bool Loader::Analyze() machine = m_loader->GetMachine(); entry = m_loader->GetMachine() == MACHINE_SPU ? m_loader->GetEntry() + g_spu_offset : m_loader->GetEntry(); - _text_section_offset = m_loader->GetTextEntry(); return true; } diff --git a/rpcs3/Loader/Loader.h b/rpcs3/Loader/Loader.h index ee04d50911..ab5c974c20 100644 --- a/rpcs3/Loader/Loader.h +++ b/rpcs3/Loader/Loader.h @@ -181,14 +181,12 @@ protected: u32 min_addr; u32 max_addr; Elf_Machine machine; - u32 _text_section_offset; LoaderBase() : machine(MACHINE_Unknown) , entry(0) , min_addr(0) , max_addr(0) - , _text_section_offset(0) { } @@ -198,7 +196,6 @@ public: Elf_Machine GetMachine() { return machine; } u32 GetEntry() { return entry; } - u32 GetTextEntry() { return _text_section_offset; } u32 GetMinAddr() { return min_addr; } u32 GetMaxAddr() { return min_addr; } };