diff options
author | bunnei <ericbunnie@gmail.com> | 2014-04-01 04:15:02 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-04-01 04:15:02 +0200 |
commit | e32c03e86007fa9bbb8b74a73a098763afe771d6 (patch) | |
tree | d50314479b9783fdc694e56e6a685c4292336e5e /src/core/src/elf/elf_reader.cpp | |
parent | added support for reading/writing to stack mem (diff) | |
download | yuzu-e32c03e86007fa9bbb8b74a73a098763afe771d6.tar yuzu-e32c03e86007fa9bbb8b74a73a098763afe771d6.tar.gz yuzu-e32c03e86007fa9bbb8b74a73a098763afe771d6.tar.bz2 yuzu-e32c03e86007fa9bbb8b74a73a098763afe771d6.tar.lz yuzu-e32c03e86007fa9bbb8b74a73a098763afe771d6.tar.xz yuzu-e32c03e86007fa9bbb8b74a73a098763afe771d6.tar.zst yuzu-e32c03e86007fa9bbb8b74a73a098763afe771d6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/src/elf/elf_reader.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/core/src/elf/elf_reader.cpp b/src/core/src/elf/elf_reader.cpp index 21d8aea67..aef7c13e9 100644 --- a/src/core/src/elf/elf_reader.cpp +++ b/src/core/src/elf/elf_reader.cpp @@ -70,15 +70,15 @@ ElfReader::ElfReader(void *ptr) segments = (Elf32_Phdr *)(base + header->e_phoff); sections = (Elf32_Shdr *)(base + header->e_shoff); - for (int i = 0; i < GetNumSegments(); i++) - { - byteswapSegment(segments[i]); - } - - for (int i = 0; i < GetNumSections(); i++) - { - byteswapSection(sections[i]); - } + //for (int i = 0; i < GetNumSegments(); i++) + //{ + // byteswapSegment(segments[i]); + //} + + //for (int i = 0; i < GetNumSections(); i++) + //{ + // byteswapSection(sections[i]); + //} entryPoint = header->e_entry; } @@ -122,6 +122,7 @@ bool ElfReader::LoadInto(u32 vaddr) u32 segmentVAddr[32]; u32 baseAddress = bRelocate?vaddr:0; + for (int i = 0; i < header->e_phnum; i++) { Elf32_Phdr *p = segments + i; |