llvm.org GIT mirror llvm / 785cf2e test / tools / llvm-readobj / elf-invalid-versioning.test
785cf2e

Tree @785cf2e (Download .tar.gz)

elf-invalid-versioning.test @785cf2eraw · history · blame

# RUN: yaml2obj %s -o %t
# RUN: llvm-readelf -V %t | FileCheck %s --check-prefix=INVALID

# INVALID:      Version symbols section '.gnu.version' contains 2 entries:
# INVALID-NEXT:  Addr: 0000000000200210  Offset: 0x000240  Link: 6 (.dynsym)
# INVALID-NEXT:   000:   0 (*local*)       3 (*invalid*)

--- !ELF
FileHeader:
  Class:             ELFCLASS64
  Data:              ELFDATA2LSB
  Type:              ET_EXEC
  Machine:           EM_X86_64
  Entry:             0x0000000000201000
Sections:
  - Name:            .gnu.version
    Type:            SHT_GNU_versym
    Flags:           [ SHF_ALLOC ]
    Address:         0x0000000000200210
    Link:            .dynsym
    AddressAlign:    0x0000000000000002
    EntSize:         0x0000000000000002
    Entries:         [ 0, 3 ]
  - Name:            .gnu.version_r
    Type:            SHT_GNU_verneed
    Flags:           [ SHF_ALLOC ]
    Address:         0x0000000000200250
    Link:            .dynstr
    AddressAlign:    0x0000000000000004
    Info:            0x0000000000000001
    Dependencies:
      - Version:     1
        File:        somefile
        Entries:
          - Name:    ''         # invalid name
            Hash:    1937
            Flags:   233
            Other:   3
DynamicSymbols:
  - Name:          f
    Binding:       STB_GLOBAL
...