[PATCH] Update include/llvm/Support/ELF.h for ELFOSABI_* changes.
Thomas Schwinge
thomas at codesourcery.com
Mon Mar 25 08:50:13 PDT 2013
ELFOSABI_GNU replaces ELFOSABI_LINUX, the latter is kept as a compatibility
alias, and ELFOSABI_HURD is removed. See the table on
<http://www.sco.com/developers/gabi/latest/ch4.eheader.html#osabi> for
reference.
---
include/llvm/MC/MCELFObjectWriter.h | 2 +-
include/llvm/Support/ELF.h | 4 ++--
test/MC/Mips/elf_basic.s | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git include/llvm/MC/MCELFObjectWriter.h include/llvm/MC/MCELFObjectWriter.h
index a59776d..562648c 100644
--- include/llvm/MC/MCELFObjectWriter.h
+++ include/llvm/MC/MCELFObjectWriter.h
@@ -68,7 +68,7 @@ public:
case Triple::FreeBSD:
return ELF::ELFOSABI_FREEBSD;
case Triple::Linux:
- return ELF::ELFOSABI_LINUX;
+ return ELF::ELFOSABI_GNU;
default:
return ELF::ELFOSABI_NONE;
}
diff --git include/llvm/Support/ELF.h include/llvm/Support/ELF.h
index cc9151e..cea691f 100644
--- include/llvm/Support/ELF.h
+++ include/llvm/Support/ELF.h
@@ -310,8 +310,8 @@ enum {
ELFOSABI_NONE = 0, // UNIX System V ABI
ELFOSABI_HPUX = 1, // HP-UX operating system
ELFOSABI_NETBSD = 2, // NetBSD
- ELFOSABI_LINUX = 3, // GNU/Linux
- ELFOSABI_HURD = 4, // GNU/Hurd
+ ELFOSABI_GNU = 3, // GNU
+ ELFOSABI_LINUX = 3, // alias for ELFOSABI_GNU
ELFOSABI_SOLARIS = 6, // Solaris
ELFOSABI_AIX = 7, // AIX
ELFOSABI_IRIX = 8, // IRIX
diff --git test/MC/Mips/elf_basic.s test/MC/Mips/elf_basic.s
index ffc3b11..7c4f0b1 100644
--- test/MC/Mips/elf_basic.s
+++ test/MC/Mips/elf_basic.s
@@ -31,5 +31,5 @@
// This is little endian.
// CHECK-LE64: ('e_indent[EI_DATA]', 0x01)
-// Check that we are setting EI_OSABI to ELFOSABI_LINUX.
+// Check that we are setting EI_OSABI to ELFOSABI_GNU.
// CHECK-LE64: ('e_indent[EI_OSABI]', 0x03)
--
1.7.9.5
More information about the llvm-commits
mailing list