[PATCH] AMDGPU/SI: Set ELF OS/ABI to ELFOSABI_AMDGPU_HSA
Tom Stellard
thomas.stellard at amd.com
Wed Jun 24 13:33:26 PDT 2015
Hi arsenm, rafael,
http://reviews.llvm.org/D10708
Files:
lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
test/CodeGen/AMDGPU/elf.ll
Index: lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
===================================================================
--- lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
+++ lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
@@ -30,8 +30,10 @@
} // End anonymous namespace
+#define ELFOSABI_AMDGPU_HSA 64
+
AMDGPUELFObjectWriter::AMDGPUELFObjectWriter(bool Is64Bit)
- : MCELFObjectTargetWriter(Is64Bit, 0, ELF::EM_AMDGPU, false) { }
+ : MCELFObjectTargetWriter(Is64Bit, ELFOSABI_AMDGPU_HSA, ELF::EM_AMDGPU, false) { }
MCObjectWriter *llvm::createAMDGPUELFObjectWriter(bool Is64Bit, raw_pwrite_stream &OS) {
MCELFObjectTargetWriter *MOTW = new AMDGPUELFObjectWriter(Is64Bit);
Index: test/CodeGen/AMDGPU/elf.ll
===================================================================
--- test/CodeGen/AMDGPU/elf.ll
+++ test/CodeGen/AMDGPU/elf.ll
@@ -9,6 +9,8 @@
; RUN: llc < %s -mtriple=amdgcn-pc-mingw -mcpu=SI -verify-machineinstrs -filetype=obj | llvm-readobj -s -symbols -file-headers - | FileCheck --check-prefix=ELF %s
; ELF: Format: ELF64
+; 0x40 is machine dependent, but llvm defines it as C600_ELFABI.
+; ELF: OS/ABI: C6000_ELFABI (0x40)
; ELF: Machine: EM_AMDGPU (0xE0)
; ELF: Name: .AMDGPU.config
; ELF: Type: SHT_PROGBITS
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10708.28396.patch
Type: text/x-patch
Size: 1278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150624/56f926f1/attachment.bin>
More information about the llvm-commits
mailing list