Compiler projects using llvm
## Test that note values are interpreted correctly for FreeBSD core files.
# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readelf --notes %t.o | FileCheck %s --check-prefix=GNU --strict-whitespace
# RUN: llvm-readobj --notes %t.o | FileCheck %s --check-prefix=LLVM --strict-whitespace

--- !ELF
FileHeader:
  Class: ELFCLASS64
  Data:  ELFDATA2LSB
  Type:  ET_CORE
Sections:
  - Name: .note.foo
    Type: SHT_NOTE
    Notes:
      - Name: FreeBSD
        Type: NT_FREEBSD_THRMISC
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_PROC
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_FILES
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_VMMAP
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_GROUPS
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_UMASK
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_RLIMIT
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_OSREL
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_PSSTRINGS
      - Name: FreeBSD
        Type: NT_FREEBSD_PROCSTAT_AUXV
      - Name: FreeBSD
        Type: 0x12345
  - Name:  .note.bar
    Type:  SHT_NOTE
    Notes:
      - Name: FreeBSD
        Desc: 'aabbccddeeff'
        Type: NT_PRPSINFO
ProgramHeaders:
  - Type:     PT_NOTE
    FirstSec: .note.foo
    LastSec:  .note.foo
  - Type:     PT_NOTE
    FirstSec: .note.bar
    LastSec:  .note.bar

# GNU:      Displaying notes found at file offset 0x000000b0 with length 0x000000dc:
# GNU-NEXT:   Owner                Data size 	Description
# GNU-NEXT:   FreeBSD              0x00000000	NT_THRMISC (thrmisc structure)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_PROC (proc data)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_FILES (files data)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_VMMAP (vmmap data)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_GROUPS (groups data)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_UMASK (umask data)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_RLIMIT (rlimit data)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_OSREL (osreldate data)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_PSSTRINGS (ps_strings data)
# GNU-NEXT:   FreeBSD              0x00000000	NT_PROCSTAT_AUXV (auxv data)
# GNU-NEXT:   FreeBSD              0x00000000	Unknown note type: (0x00012345)
# GNU-EMPTY:
# GNU-NEXT: Displaying notes found at file offset 0x0000018c with length 0x0000001c:
# GNU-NEXT:   Owner                Data size 	Description
# GNU-NEXT:   FreeBSD              0x00000006	NT_PRPSINFO (prpsinfo structure)
# GNU-NEXT:     description data: aa bb cc dd ee ff
# GNU-EMPTY:

# LLVM:      Notes [
# LLVM-NEXT:   NoteSection {
# LLVM-NEXT:     Name: <?>
# LLVM-NEXT:     Offset: 0xB0
# LLVM-NEXT:     Size: 0xDC
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_THRMISC (thrmisc structure)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_PROC (proc data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_FILES (files data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_VMMAP (vmmap data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_GROUPS (groups data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_UMASK (umask data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_RLIMIT (rlimit data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_OSREL (osreldate data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_PSSTRINGS (ps_strings data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: NT_PROCSTAT_AUXV (auxv data)
# LLVM-NEXT:     }
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x0
# LLVM-NEXT:       Type: Unknown (0x00012345)
# LLVM-NEXT:     }
# LLVM-NEXT:   }
# LLVM-NEXT:   NoteSection {
# LLVM-NEXT:     Name: <?>
# LLVM-NEXT:     Offset: 0x18C
# LLVM-NEXT:     Size: 0x1C
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: FreeBSD
# LLVM-NEXT:       Data size: 0x6
# LLVM-NEXT:       Type: NT_PRPSINFO (prpsinfo structure)
# LLVM-NEXT:       Description data (
# LLVM-NEXT:         0000: AABBCCDD EEFF                        |......|
# LLVM-NEXT:       )
# LLVM-NEXT:     }
# LLVM-NEXT:   }
# LLVM-NEXT: ]