|
From: <sv...@va...> - 2009-08-18 14:12:59
|
Author: tom
Date: 2009-08-18 15:12:48 +0100 (Tue, 18 Aug 2009)
New Revision: 10841
Log:
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.
Modified:
trunk/coregrind/launcher-linux.c
Modified: trunk/coregrind/launcher-linux.c
===================================================================
--- trunk/coregrind/launcher-linux.c 2009-08-18 13:47:31 UTC (rev 10840)
+++ trunk/coregrind/launcher-linux.c 2009-08-18 14:12:48 UTC (rev 10841)
@@ -159,13 +159,15 @@
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 @@
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";
}
}
|