1 ## Ensures that implicitly added sections can be ordered within Sections.
3 # RUN: yaml2obj --docnum=1 %s -o %t1
4 # RUN: llvm-readobj --sections %t1 | FileCheck %s --check-prefix=SECTION
5 # RUN: llvm-nm --dynamic %t1 | FileCheck %s --check-prefix=SYMBOL
16 Flags: [ SHF_ALLOC, SHF_WRITE ]
31 # SECTION: Name: .dynsym
32 # SECTION-NEXT: Type: SHT_DYNSYM
34 # SECTION-NEXT: SHF_ALLOC
35 # SECTION: Name: .dynstr
36 # SECTION-NEXT: Type: SHT_STRTAB
38 # SECTION-NEXT: SHF_ALLOC
40 # SYMBOL-DAG: d dynlocal
41 # SYMBOL-DAG: D dynglobal
42 # SYMBOL-DAG: V dynweak
44 ## Check we can use numeric values to refer to sections.
46 # RUN: yaml2obj --docnum=2 %s -o %t2
47 # RUN: not llvm-readobj --dyn-symbols %t2 2>&1 | FileCheck -DFILE=%t2 %s --check-prefix=NUM
51 # NUM-SAME: .data (0x1)
55 # NUM-SAME: .symtab (0x2)
57 # NUM: error: '[[FILE]]': invalid section index: 255
76 ## Check we report errors when unknown sections are referenced by dynamic symbols.
78 # RUN: not yaml2obj --docnum=3 %s 2>&1 | FileCheck -DFILE=%t3 %s --check-prefix=ERR
80 # ERR: error: unknown section referenced: '.sec1' by YAML symbol 'foo'
81 # ERR: error: unknown section referenced: '.sec2' by YAML symbol 'bar'