llvm.org GIT mirror llvm / 642cc2d test / tools / yaml2obj / explicit-dynsym-no-dynstr.yaml
642cc2d

Tree @642cc2d (Download .tar.gz)

explicit-dynsym-no-dynstr.yaml @642cc2draw · history · blame

## Check we do not crash/assert when .dynsym is specified
## explicitly, but .dynstr is not present.

# RUN: yaml2obj %s -o %t
# RUN: llvm-readelf --section-headers %t | FileCheck %s

## Check that .dynsym has Link field set to 0.

# CHECK:      Section Headers:
# CHECK-NEXT:  [Nr] Name    Type   Address          Off    Size   ES Flg Lk
# CHECK-NEXT:  [ 0]         NULL   0000000000000000 000000 000000 00 0   0
# CHECK-NEXT:  [ 1] .dynsym DYNSYM 0000000000000000 000180 000018 18 A   0

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_DYN
  Machine: EM_X86_64
Sections:
  - Name: .dynsym
    Type: SHT_SYMTAB