• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2# Verify that OSABI is set to the correct value.
3
4# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd %s -o %t
5# RUN: ld.lld %t -o %t2
6# RUN: llvm-readobj --file-headers %t2 | FileCheck %s
7
8.globl _start
9_start:
10  mov $1, %rax
11  mov $42, %rdi
12  syscall
13
14# CHECK: ElfHeader {
15# CHECK-NEXT:   Ident {
16# CHECK-NEXT:     Magic: (7F 45 4C 46)
17# CHECK-NEXT:     Class: 64-bit (0x2)
18# CHECK-NEXT:     DataEncoding: LittleEndian (0x1)
19# CHECK-NEXT:     FileVersion: 1
20# CHECK-NEXT:     OS/ABI: FreeBSD (0x9)
21# CHECK-NEXT:     ABIVersion: 0
22# CHECK-NEXT:     Unused: (00 00 00 00 00 00 00)
23# CHECK-NEXT:   }
24# CHECK-NEXT:   Type: Executable (0x2)
25# CHECK-NEXT:   Machine: EM_X86_64 (0x3E)
26