Home | History | Annotate | Download | only in llvm-readobj
      1 // Test that llvm-readobj dumps version info tags correctly.
      2 
      3 RUN: llvm-readobj -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s
      4 
      5 CHECK: 0x000000006FFFFFF0 VERSYM               0x24C
      6 CHECK: 0x000000006FFFFFFC VERDEF               0x25C
      7 CHECK: 0x000000006FFFFFFD VERDEFNUM            3
      8 
      9 CHECK: Version symbols {
     10 CHECK-NEXT:   Section Name: .gnu.version (20)
     11 CHECK-NEXT:   Address: 0x24C
     12 CHECK-NEXT:   Offset: 0x24C
     13 CHECK-NEXT:   Link: 1
     14 CHECK-NEXT:   Symbols [
     15 CHECK-NEXT:     Symbol {
     16 CHECK-NEXT:       Version: 0
     17 CHECK-NEXT:       Name: @
     18 CHECK-NEXT:     }
     19 CHECK-NEXT:     Symbol {
     20 CHECK-NEXT:       Version: 1
     21 CHECK-NEXT:       Name: _end@
     22 CHECK-NEXT:     }
     23 CHECK-NEXT:     Symbol {
     24 CHECK-NEXT:       Version: 1
     25 CHECK-NEXT:       Name: _edata@
     26 CHECK-NEXT:     }
     27 CHECK-NEXT:     Symbol {
     28 CHECK-NEXT:       Version: 3
     29 CHECK-NEXT:       Name: goo@@VERSION2
     30 CHECK-NEXT:     }
     31 CHECK-NEXT:     Symbol {
     32 CHECK-NEXT:       Version: 1
     33 CHECK-NEXT:       Name: __bss_start@
     34 CHECK-NEXT:     }
     35 CHECK-NEXT:     Symbol {
     36 CHECK-NEXT:       Version: 2
     37 CHECK-NEXT:       Name: foo@@VERSION1
     38 CHECK-NEXT:     }
     39 CHECK-NEXT:     Symbol {
     40 CHECK-NEXT:       Version: 2
     41 CHECK-NEXT:       Name: VERSION1@@VERSION1
     42 CHECK-NEXT:     }
     43 CHECK-NEXT:     Symbol {
     44 CHECK-NEXT:       Version: 3
     45 CHECK-NEXT:       Name: VERSION2@@VERSION2
     46 CHECK-NEXT:     }
     47 CHECK-NEXT:   ]
     48 CHECK-NEXT: }
     49 
     50 CHECK: Version definition {
     51 CHECK-NEXT:   Section Name: .gnu.version_d (70)
     52 CHECK-NEXT:   Address: 0x25C
     53 CHECK-NEXT:   Offset: 0x25C
     54 CHECK-NEXT:   Link: 2
     55 CHECK-NEXT:   Entries [
     56 CHECK-NEXT:     Entry {
     57 CHECK-NEXT:       Offset: 0x0
     58 CHECK-NEXT:       Rev: 1
     59 CHECK-NEXT:       Flags: 1
     60 CHECK-NEXT:       Index: 1
     61 CHECK-NEXT:       Cnt: 1
     62 CHECK-NEXT:       Name: blah
     63 CHECK-NEXT:     }
     64 CHECK-NEXT:     Entry {
     65 CHECK-NEXT:       Offset: 0x1C
     66 CHECK-NEXT:       Rev: 1
     67 CHECK-NEXT:       Flags: 0
     68 CHECK-NEXT:       Index: 2
     69 CHECK-NEXT:       Cnt: 1
     70 CHECK-NEXT:       Name: VERSION1
     71 CHECK-NEXT:     }
     72 CHECK-NEXT:     Entry {
     73 CHECK-NEXT:       Offset: 0x38
     74 CHECK-NEXT:       Rev: 1
     75 CHECK-NEXT:       Flags: 0
     76 CHECK-NEXT:       Index: 3
     77 CHECK-NEXT:       Cnt: 2
     78 CHECK-NEXT:       Name: VERSION2
     79 CHECK-NEXT:     }
     80 CHECK-NEXT:   ]
     81 CHECK-NEXT: }
     82