[Scummvm-cvs-logs] SF.net SVN: scummvm:[51403] scummvm/branches/gsoc2010-plugins/backends/ plugins
toneman1138 at users.sourceforge.net
toneman1138 at users.sourceforge.net
Wed Jul 28 07:18:46 CEST 2010
Revision: 51403
http://scummvm.svn.sourceforge.net/scummvm/?rev=51403&view=rev
Author: toneman1138
Date: 2010-07-28 05:18:46 +0000 (Wed, 28 Jul 2010)
Log Message:
-----------
added check for MIPS machine type in the 'readElfHeader' method
Modified Paths:
--------------
scummvm/branches/gsoc2010-plugins/backends/plugins/elf-loader.cpp
scummvm/branches/gsoc2010-plugins/backends/plugins/elf-loader.h
Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf-loader.cpp
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf-loader.cpp 2010-07-28 05:03:23 UTC (rev 51402)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf-loader.cpp 2010-07-28 05:18:46 UTC (rev 51403)
@@ -93,7 +93,12 @@
if (DLFile->read(ehdr, sizeof(*ehdr)) != sizeof(*ehdr) ||
memcmp(ehdr->e_ident, ELFMAG, SELFMAG) || // Check MAGIC
ehdr->e_type != ET_EXEC || // Check for executable
+#ifdef ARM_TARGET
ehdr->e_machine != EM_ARM || // Check for ARM machine type
+#endif
+#ifdef MIPS_TARGET
+ ehdr->e_machine != EM_MIPS ||
+#endif
ehdr->e_phentsize < sizeof(Elf32_Phdr) || // Check for size of program header
ehdr->e_shentsize != sizeof(Elf32_Shdr)) { // Check for size of section header
seterror("Invalid file type.");
Modified: scummvm/branches/gsoc2010-plugins/backends/plugins/elf-loader.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/plugins/elf-loader.h 2010-07-28 05:03:23 UTC (rev 51402)
+++ scummvm/branches/gsoc2010-plugins/backends/plugins/elf-loader.h 2010-07-28 05:18:46 UTC (rev 51403)
@@ -34,6 +34,10 @@
#include "shorts-segment-manager.h"
#endif
+#if defined(__DS__)
+#define ARM_TARGET
+#endif
+
#define MAXDLERRLEN 80
class DLObject {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list