1# RUN: yaml2obj -format=elf %s | llvm-readobj -symbols - | \ 2# RUN: FileCheck --check-prefix OBJ %s 3# RUN: yaml2obj -format=elf %s | obj2yaml - | FileCheck --check-prefix YAML %s 4 5# OBJ: Symbol { 6# OBJ: Name: default1 (36) 7# OBJ-NEXT: Value: 0x0 8# OBJ-NEXT: Size: 4 9# OBJ-NEXT: Binding: Global (0x1) 10# OBJ-NEXT: Type: Object (0x1) 11# OBJ-NEXT: Other: 0 12# OBJ-NEXT: Section: .data (0x1) 13# OBJ-NEXT: } 14# OBJ-NEXT: Symbol { 15# OBJ-NEXT: Name: default2 (27) 16# OBJ-NEXT: Value: 0x4 17# OBJ-NEXT: Size: 4 18# OBJ-NEXT: Binding: Global (0x1) 19# OBJ-NEXT: Type: Object (0x1) 20# OBJ-NEXT: Other: 0 21# OBJ-NEXT: Section: .data (0x1) 22# OBJ-NEXT: } 23# OBJ-NEXT: Symbol { 24# OBJ-NEXT: Name: internal (8) 25# OBJ-NEXT: Value: 0x8 26# OBJ-NEXT: Size: 4 27# OBJ-NEXT: Binding: Global (0x1) 28# OBJ-NEXT: Type: Object (0x1) 29# OBJ-NEXT: Other: 1 30# OBJ-NEXT: Section: .data (0x1) 31# OBJ-NEXT: } 32# OBJ-NEXT: Symbol { 33# OBJ-NEXT: Name: hidden (1) 34# OBJ-NEXT: Value: 0xC 35# OBJ-NEXT: Size: 4 36# OBJ-NEXT: Binding: Global (0x1) 37# OBJ-NEXT: Type: Object (0x1) 38# OBJ-NEXT: Other: 2 39# OBJ-NEXT: Section: .data (0x1) 40# OBJ-NEXT: } 41# OBJ-NEXT: Symbol { 42# OBJ-NEXT: Name: protected (17) 43# OBJ-NEXT: Value: 0x10 44# OBJ-NEXT: Size: 4 45# OBJ-NEXT: Binding: Global (0x1) 46# OBJ-NEXT: Type: Object (0x1) 47# OBJ-NEXT: Other: 163 48# OBJ-NEXT: Section: .data (0x1) 49# OBJ-NEXT: } 50 51# YAML: Symbols: 52# YAML-NEXT: Global: 53# YAML-NEXT: - Name: default1 54# YAML-NEXT: Type: STT_OBJECT 55# YAML-NEXT: Section: .data 56# YAML-NEXT: Size: 0x0000000000000004 57# YAML-NEXT: - Name: default2 58# YAML-NEXT: Type: STT_OBJECT 59# YAML-NEXT: Section: .data 60# YAML-NEXT: Value: 0x0000000000000004 61# YAML-NEXT: Size: 0x0000000000000004 62# YAML-NEXT: - Name: internal 63# YAML-NEXT: Type: STT_OBJECT 64# YAML-NEXT: Section: .data 65# YAML-NEXT: Value: 0x0000000000000008 66# YAML-NEXT: Size: 0x0000000000000004 67# YAML-NEXT: Visibility: STV_INTERNAL 68# YAML-NEXT: - Name: hidden 69# YAML-NEXT: Type: STT_OBJECT 70# YAML-NEXT: Section: .data 71# YAML-NEXT: Value: 0x000000000000000C 72# YAML-NEXT: Size: 0x0000000000000004 73# YAML-NEXT: Visibility: STV_HIDDEN 74# YAML-NEXT: - Name: protected 75# YAML-NEXT: Type: STT_OBJECT 76# YAML-NEXT: Section: .data 77# YAML-NEXT: Value: 0x0000000000000010 78# YAML-NEXT: Size: 0x0000000000000004 79# YAML-NEXT: Visibility: STV_PROTECTED 80# YAML-NEXT: Other: [ STO_MIPS_PIC, STO_MIPS_MICROMIPS ] 81 82--- 83FileHeader: 84 Class: ELFCLASS32 85 Data: ELFDATA2LSB 86 Type: ET_REL 87 Machine: EM_MIPS 88 Flags: [ EF_MIPS_ABI_O32, EF_MIPS_ARCH_32 ] 89 90Sections: 91 - Name: .data 92 Type: SHT_PROGBITS 93 Flags: [ SHF_ALLOC, SHF_WRITE ] 94 AddressAlign: 0x04 95 Size: 0x14 96 97Symbols: 98 Global: 99 - Name: default1 100 Type: STT_OBJECT 101 Visibility: STV_DEFAULT 102 Section: .data 103 Value: 0x00 104 Size: 0x04 105 - Name: default2 106 Type: STT_OBJECT 107 Section: .data 108 Value: 0x04 109 Size: 0x04 110 - Name: internal 111 Type: STT_OBJECT 112 Visibility: STV_INTERNAL 113 Section: .data 114 Value: 0x08 115 Size: 0x04 116 - Name: hidden 117 Type: STT_OBJECT 118 Visibility: STV_HIDDEN 119 Section: .data 120 Value: 0x0C 121 Size: 0x04 122 - Name: protected 123 Type: STT_OBJECT 124 Visibility: STV_PROTECTED 125 Other: [ STO_MIPS_MICROMIPS, STO_MIPS_PIC ] 126 Section: .data 127 Value: 0x10 128 Size: 0x04 129