1## Check we allow placing local symbols after global to 2## .symtab and .dynsym. This allows us to produce broken outputs. 3 4# RUN: yaml2obj %s -o %t 5# RUN: llvm-readelf --symbols %t | FileCheck %s 6 7# CHECK: Symbol table '.dynsym' contains 3 entries: 8# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name 9# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 10# CHECK-NEXT: 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND dynamicGlobal 11# CHECK-NEXT: 2: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND dynamicLocal 12 13# CHECK: Symbol table '.symtab' contains 3 entries: 14# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name 15# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 16# CHECK-NEXT: 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND staticGlobal 17# CHECK-NEXT: 2: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND staticLocal 18 19--- !ELF 20FileHeader: 21 Class: ELFCLASS64 22 Data: ELFDATA2LSB 23 Type: ET_REL 24Symbols: 25 - Name: staticGlobal 26 Binding: STB_GLOBAL 27 - Name: staticLocal 28 Binding: STB_LOCAL 29DynamicSymbols: 30 - Name: dynamicGlobal 31 Binding: STB_GLOBAL 32 - Name: dynamicLocal 33 Binding: STB_LOCAL 34