From 6098f10fee83899afb5b4249fa034eebe016f073 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 18 Aug 2009 14:12:48 +0000 Subject: [PATCH] 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 --- coregrind/launcher-linux.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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"; } } -- 2.47.3