From: Tom Hughes Date: Tue, 18 Aug 2009 14:12:48 +0000 (+0000) Subject: The linker in Fedora Rawhide seems to be using ELFOSABI_LINUX as X-Git-Tag: svn/VALGRIND_3_5_0~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6098f10fee83899afb5b4249fa034eebe016f073;p=thirdparty%2Fvalgrind.git The linker in Fedora Rawhide seems to be using ELFOSABI_LINUX as 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 --- diff --git a/coregrind/launcher-linux.c b/coregrind/launcher-linux.c index 7b89969aee..4653a5ae4d 100644 --- a/coregrind/launcher-linux.c +++ b/coregrind/launcher-linux.c @@ -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"; } }