llvm.org GIT mirror llvm / 642cc2d test / tools / yaml2obj / elf-symtab-shinfo.yaml
642cc2d

Tree @642cc2d (Download .tar.gz)

elf-symtab-shinfo.yaml @642cc2draw · history · blame

## Check we are able to set sh_info field for SHT_SYMTAB sections.
# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --sections %t | FileCheck %s

# CHECK:      Name: .symtab
# CHECK-NEXT: Type: SHT_SYMTAB
# CHECK-NEXT: Flags [
# CHECK-NEXT: ]
# CHECK-NEXT: Address:
# CHECK-NEXT: Offset:
# CHECK-NEXT: Size:
# CHECK-NEXT: Link:
# CHECK-NEXT: Info: 42
# CHECK:      Name: .dynsym
# CHECK-NEXT: Type: SHT_DYNSYM
# CHECK-NEXT: Flags [
# CHECK-NEXT:   SHF_ALLOC
# CHECK-NEXT: ]
# CHECK-NEXT: Address:
# CHECK-NEXT: Offset:
# CHECK-NEXT: Size:
# CHECK-NEXT: Link:
# CHECK-NEXT: Info: 26
 
--- !ELF
FileHeader:
  Class:           ELFCLASS64
  Data:            ELFDATA2LSB
  Type:            ET_REL
  Machine:         EM_X86_64
Sections:
  - Name:          .symtab
    Info:          42
    Type:          SHT_SYMTAB
  - Name:          .dynsym
    Info:          26
    Type:          SHT_SYMTAB
Symbols:
  - Name:    foo
    Binding: STB_GLOBAL
DynamicSymbols:
  - Name:    bar
    Binding: STB_GLOBAL