From 5c37d1622d602fe7cd6786b939b876361852d4c7 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 24 Sep 2015 20:57:24 +0000 Subject: [PATCH] Use ELFOSABI_NONE instead of ELFOSABI_LINUX. The doesn't seem to be a difference and ELFOSABI_NONE seems to be far more common: * Linux doesn't care when loading and puts ELFOSABI_NONE on core dumps. * Gold and bfd ld produce files with ELFOSABI_NONE. * Gold and bfd ld seems to ignore EI_OSABI other than for freebsd. * Gas puts ELFOSABI_NONE in most .o files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248534 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCELFObjectWriter.h | 2 -- test/MC/AArch64/elf_osabi_flags.s | 7 +++---- test/MC/Mips/elf_basic.s | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/llvm/MC/MCELFObjectWriter.h b/include/llvm/MC/MCELFObjectWriter.h index 01f694d3b75..193dac018b2 100644 --- a/include/llvm/MC/MCELFObjectWriter.h +++ b/include/llvm/MC/MCELFObjectWriter.h @@ -57,8 +57,6 @@ public: case Triple::PS4: case Triple::FreeBSD: return ELF::ELFOSABI_FREEBSD; - case Triple::Linux: - return ELF::ELFOSABI_LINUX; default: return ELF::ELFOSABI_NONE; } diff --git a/test/MC/AArch64/elf_osabi_flags.s b/test/MC/AArch64/elf_osabi_flags.s index 68cb385fc99..0e683ee806c 100644 --- a/test/MC/AArch64/elf_osabi_flags.s +++ b/test/MC/AArch64/elf_osabi_flags.s @@ -1,5 +1,4 @@ -# RUN: llvm-mc -filetype=obj -triple aarch64 %s -o -| llvm-readobj -h | FileCheck --check-prefix=AARCH64-OSABI %s -# AARCH64-OSABI: OS/ABI: SystemV (0x0) +# RUN: llvm-mc -filetype=obj -triple aarch64 %s -o -| llvm-readobj -h | FileCheck %s +# RUN: llvm-mc -filetype=obj -triple aarch64-linux-gnu %s -o -| llvm-readobj -h | FileCheck %s -# RUN: llvm-mc -filetype=obj -triple aarch64-linux-gnu %s -o -| llvm-readobj -h | FileCheck --check-prefix=AARCH64-LINUX-OSABI %s -# AARCH64-LINUX-OSABI: OS/ABI: GNU/Linux (0x3) +# CHECK: OS/ABI: SystemV (0x0) diff --git a/test/MC/Mips/elf_basic.s b/test/MC/Mips/elf_basic.s index 6c1e7690126..4739247f67f 100644 --- a/test/MC/Mips/elf_basic.s +++ b/test/MC/Mips/elf_basic.s @@ -36,6 +36,6 @@ // CHECK-LE64: Ident { // CHECK-LE64: Class: 64-bit // CHECK-LE64: DataEncoding: LittleEndian -// CHECK-LE64: OS/ABI: GNU/Linux +// CHECK-LE64: OS/ABI: SystemV // CHECK-LE64: } // CHECK-LE64: } -- 2.34.1