]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
The linker in Fedora Rawhide seems to be using ELFOSABI_LINUX as
authorTom Hughes <tom@compton.nu>
Tue, 18 Aug 2009 14:12:48 +0000 (14:12 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 18 Aug 2009 14:12:48 +0000 (14:12 +0000)
the ABI in the ELF files it generates instead of ELFOSABI_SYSV as
has been used to date.

This was causing us to use the 64 bit backend to run 32 bit
programs as the launcher failed to identify them as 32 bit.

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

coregrind/launcher-linux.c

index 7b89969aeedb5ff6b379be87076c092108c8f720..4653a5ae4de186ceaecc0ecfc32acacd129605ec 100644 (file)
@@ -159,13 +159,15 @@ static const char *select_platform(const char *clientname)
 
          if (header[EI_DATA] == ELFDATA2LSB) {
             if (ehdr->e_machine == EM_386 &&
-                ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV) {
+                (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
+                 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
                platform = "x86-linux";
             }
          }
          else if (header[EI_DATA] == ELFDATA2MSB) {
             if (ehdr->e_machine == EM_PPC &&
-                ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV) {
+                (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
+                 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
                platform = "ppc32-linux";
             }
          }
@@ -174,12 +176,14 @@ static const char *select_platform(const char *clientname)
 
          if (header[EI_DATA] == ELFDATA2LSB) {
             if (ehdr->e_machine == EM_X86_64 &&
-                ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV) {
+                (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
+                 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
                platform = "amd64-linux";
             }
          } else if (header[EI_DATA] == ELFDATA2MSB) {
             if (ehdr->e_machine == EM_PPC64 &&
-                ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV) {
+                (ehdr->e_ident[EI_OSABI] == ELFOSABI_SYSV ||
+                 ehdr->e_ident[EI_OSABI] == ELFOSABI_LINUX)) {
                platform = "ppc64-linux";
             }
          }