]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Conditionalise code that uses some ELF constants that Android doesn't
authorJulian Seward <jseward@acm.org>
Tue, 12 Jul 2011 10:59:27 +0000 (10:59 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 12 Jul 2011 10:59:27 +0000 (10:59 +0000)
know about, and remove three unnecessary #defines.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11884

coregrind/launcher-linux.c

index e70152dcef37c8ac8220886ebe08aed7c3fc1d28..902d1759209167a2692b3a9c1930c3da12fd19ed 100644 (file)
 #include <elf.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/mman.h>
-#include <sys/user.h>
 #include <unistd.h>
 
 
@@ -201,15 +198,19 @@ static const char *select_platform(const char *clientname)
                platform = "amd64-linux";
             }
          } else if (header[EI_DATA] == ELFDATA2MSB) {
+#           if !defined(VGPV_arm_linux_android)
             if (ehdr->e_machine == EM_PPC64 &&
                 (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
                  ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
                platform = "ppc64-linux";
-            } else if (ehdr->e_machine == EM_S390 &&
-                       (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
-                        ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
+            } 
+            else 
+            if (ehdr->e_machine == EM_S390 &&
+                (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
+                 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
                platform = "s390x-linux";
             }
+#           endif
          }
       }
    }