llvm.org GIT mirror llvm / release_38 test / tools / llvm-readobj / elf-versioninfo.test
release_38

Tree @release_38 (Download .tar.gz)

elf-versioninfo.test @release_38raw · history · blame

// Test that llvm-readobj dumps version info tags correctly.

RUN: llvm-readobj -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s

CHECK: 0x000000006FFFFFF0 VERSYM               0x24C
CHECK: 0x000000006FFFFFFC VERDEF               0x25C
CHECK: 0x000000006FFFFFFD VERDEFNUM            3

CHECK: Version symbols {
CHECK-NEXT:   Section Name: .gnu.version (20)
CHECK-NEXT:   Address: 0x24C
CHECK-NEXT:   Offset: 0x24C
CHECK-NEXT:   Link: 1
CHECK-NEXT:   Symbols [
CHECK-NEXT:     Symbol {
CHECK-NEXT:       Version: 0
CHECK-NEXT:       Name: @
CHECK-NEXT:     }
CHECK-NEXT:     Symbol {
CHECK-NEXT:       Version: 1
CHECK-NEXT:       Name: _end@
CHECK-NEXT:     }
CHECK-NEXT:     Symbol {
CHECK-NEXT:       Version: 1
CHECK-NEXT:       Name: _edata@
CHECK-NEXT:     }
CHECK-NEXT:     Symbol {
CHECK-NEXT:       Version: 3
CHECK-NEXT:       Name: goo@@VERSION2
CHECK-NEXT:     }
CHECK-NEXT:     Symbol {
CHECK-NEXT:       Version: 1
CHECK-NEXT:       Name: __bss_start@
CHECK-NEXT:     }
CHECK-NEXT:     Symbol {
CHECK-NEXT:       Version: 2
CHECK-NEXT:       Name: foo@@VERSION1
CHECK-NEXT:     }
CHECK-NEXT:     Symbol {
CHECK-NEXT:       Version: 2
CHECK-NEXT:       Name: VERSION1@@VERSION1
CHECK-NEXT:     }
CHECK-NEXT:     Symbol {
CHECK-NEXT:       Version: 3
CHECK-NEXT:       Name: VERSION2@@VERSION2
CHECK-NEXT:     }
CHECK-NEXT:   ]
CHECK-NEXT: }

CHECK: Version definition {
CHECK-NEXT:   Section Name: .gnu.version_d (70)
CHECK-NEXT:   Address: 0x25C
CHECK-NEXT:   Offset: 0x25C
CHECK-NEXT:   Link: 2
CHECK-NEXT:   Entries [
CHECK-NEXT:     Entry {
CHECK-NEXT:       Offset: 0x0
CHECK-NEXT:       Rev: 1
CHECK-NEXT:       Flags: 1
CHECK-NEXT:       Index: 1
CHECK-NEXT:       Cnt: 1
CHECK-NEXT:       Name: blah
CHECK-NEXT:     }
CHECK-NEXT:     Entry {
CHECK-NEXT:       Offset: 0x1C
CHECK-NEXT:       Rev: 1
CHECK-NEXT:       Flags: 0
CHECK-NEXT:       Index: 2
CHECK-NEXT:       Cnt: 1
CHECK-NEXT:       Name: VERSION1
CHECK-NEXT:     }
CHECK-NEXT:     Entry {
CHECK-NEXT:       Offset: 0x38
CHECK-NEXT:       Rev: 1
CHECK-NEXT:       Flags: 0
CHECK-NEXT:       Index: 3
CHECK-NEXT:       Cnt: 2
CHECK-NEXT:       Name: VERSION2
CHECK-NEXT:     }
CHECK-NEXT:   ]
CHECK-NEXT: }