[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / basic-freebsd.s
blob078f97442446336a38ab89bc6c011a275f7a78d2
1 # REQUIRES: x86
2 # Verify that OSABI is set to the correct value.
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
8 .globl _start
9 _start:
10 mov $1, %rax
11 mov $42, %rdi
12 syscall
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)