1# RUN: yaml2obj -format=elf %s | llvm-readobj -symbols - | FileCheck %s 2!ELF 3FileHeader: 4 Class: ELFCLASS64 5 Data: ELFDATA2LSB 6 Type: ET_REL 7 Machine: EM_X86_64 8Sections: 9 - Name: .text 10 Type: SHT_PROGBITS 11 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 12 Content: "90EBFE" # x86 machine code 13 # NOP ; To make main's `Value` non-zero (for testing). 14 # main: 15 # JMP -2 ; (infloop) 16 # This YAML file is a valid relocatable object that, 17 # when linked and run on x86_64, will go into an 18 # infloop. 19Symbols: 20 Global: 21 - Name: main 22 Type: STT_FUNC 23 Section: .text 24 Value: 0x1 25 Size: 2 26 - Name: undefined_symbol 27 28# CHECK: Symbols [ 29# CHECK-NEXT: Symbol { 30# CHECK-NEXT: Name: (0) 31# CHECK: Symbol { 32# CHECK-NEXT: Name: main 33# CHECK-NEXT: Value: 0x1 34# CHECK-NEXT: Size: 2 35# CHECK: Binding: Global 36# CHECK-NEXT: Type: Function 37# CHECK: Section: .text 38# CHECK: Symbol { 39# CHECK: Name: undefined_symbol 40# CHECK: Section: Undefined (0x0) 41