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 AddressAlign: 0x4 13 Content: "90EBFE" # x86 machine code 14 # NOP ; To make main's `Value` non-zero (for testing). 15 # main: 16 # JMP -2 ; (infloop) 17 # This YAML file is a valid relocatable object that, 18 # when linked and run on x86_64, will go into an 19 # infloop. 20Symbols: 21 Global: 22 - Name: main 23 Type: STT_FUNC 24 Section: .text 25 Value: 0x1 26 Size: 2 27 - Name: undefined_symbol 28 29# CHECK: Symbols [ 30# CHECK-NEXT: Symbol { 31# CHECK-NEXT: Name: (0) 32# CHECK: Symbol { 33# CHECK-NEXT: Name: main 34# CHECK-NEXT: Value: 0x1 35# CHECK-NEXT: Size: 2 36# CHECK: Binding: Global 37# CHECK-NEXT: Type: Function 38# CHECK: Section: .text 39# CHECK: Symbol { 40# CHECK: Name: undefined_symbol 41# CHECK: Section: Undefined (0x0) 42