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

Tree @stable (Download .tar.gz)

elf-versioninfo.test @stable

600b093
 
89bcca2
 
600b093
75ebb08
 
 
c813f4c
75ebb08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c813f4c
75ebb08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
df40105
75ebb08
 
 
 
9b4a520
 
 
 
 
75ebb08
 
 
 
 
 
 
 
 
 
aa784af
 
 
 
 
 
 
 
 
 
 
 
 
 
75ebb08
 
 
 
 
aa784af
 
 
 
 
 
 
 
75ebb08
 
 
9b4a520
 
 
 
75ebb08
df40105
// Test that llvm-readobj dumps version info tags correctly.

RUN: llvm-readobj --dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=LLVM-VERDEF
RUN: llvm-readelf --dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=GNU-VERDEF

LLVM-VERDEF: 0x000000006FFFFFF0 VERSYM               0x24C
LLVM-VERDEF: 0x000000006FFFFFFC VERDEF               0x25C
LLVM-VERDEF: 0x000000006FFFFFFD VERDEFNUM            3

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

LLVM-VERDEF:      SHT_GNU_verdef {
LLVM-VERDEF-NEXT:   Definition {
LLVM-VERDEF-NEXT:     Version: 1
LLVM-VERDEF-NEXT:     Flags: Base (0x1)
LLVM-VERDEF-NEXT:     Index: 1
LLVM-VERDEF-NEXT:     Hash: 430712
LLVM-VERDEF-NEXT:     Name: blah
LLVM-VERDEF-NEXT:   }
LLVM-VERDEF-NEXT:   Definition {
LLVM-VERDEF-NEXT:     Version: 1
LLVM-VERDEF-NEXT:     Flags: 0x0
LLVM-VERDEF-NEXT:     Index: 2
LLVM-VERDEF-NEXT:     Hash: 175630257
LLVM-VERDEF-NEXT:     Name: VERSION1
LLVM-VERDEF-NEXT:   }
LLVM-VERDEF-NEXT:   Definition {
LLVM-VERDEF-NEXT:     Version: 1
LLVM-VERDEF-NEXT:     Flags: 0x0
LLVM-VERDEF-NEXT:     Index: 3
LLVM-VERDEF-NEXT:     Hash: 175630258
LLVM-VERDEF-NEXT:     Name: VERSION2
LLVM-VERDEF-NEXT:     Predecessor: VERSION1
LLVM-VERDEF-NEXT:   }
LLVM-VERDEF-NEXT: }

GNU-VERDEF: 0x000000006ffffff0 VERSYM               0x24c
GNU-VERDEF: 0x000000006ffffffc VERDEF               0x25c
GNU-VERDEF: 0x000000006ffffffd VERDEFNUM            3

GNU-VERDEF:      Version symbols section '.gnu.version' contains 8 entries:
GNU-VERDEF-NEXT:  Addr: 000000000000024c  Offset: 0x00024c  Link: 1 (.dynsym)
GNU-VERDEF-NEXT:   000:   0 (*local*)       1 (*global*)      1 (*global*)      3 (VERSION2)
GNU-VERDEF-NEXT:   004:   1 (*global*)      2 (VERSION1)      2 (VERSION1)      3 (VERSION2)

GNU-VERDEF: Dumper for .gnu.version_d is not implemented

RUN: llvm-readobj -V %p/Inputs/verneed.elf-x86-64 | FileCheck %s --check-prefix=LLVM-VERNEED
RUN: llvm-readelf -V %p/Inputs/verneed.elf-x86-64 | FileCheck %s --check-prefix=GNU-VERNEED

LLVM-VERNEED:       SHT_GNU_verneed {
LLVM-VERNEED-NEXT:   Dependency {
LLVM-VERNEED-NEXT:     Version: 1
LLVM-VERNEED-NEXT:     Count: 2
LLVM-VERNEED-NEXT:     FileName: verneed1.so.0
LLVM-VERNEED-NEXT:     Entries [
LLVM-VERNEED-NEXT:       Entry {
LLVM-VERNEED-NEXT:         Hash: 1938
LLVM-VERNEED-NEXT:         Flags: 0x0
LLVM-VERNEED-NEXT:         Index: 3
LLVM-VERNEED-NEXT:         Name: v2
LLVM-VERNEED-NEXT:       }
LLVM-VERNEED-NEXT:       Entry {
LLVM-VERNEED-NEXT:         Hash: 1939
LLVM-VERNEED-NEXT:         Flags: 0x0
LLVM-VERNEED-NEXT:         Index: 2
LLVM-VERNEED-NEXT:         Name: v3
LLVM-VERNEED-NEXT:       }
LLVM-VERNEED-NEXT:     ]
LLVM-VERNEED-NEXT:   }
LLVM-VERNEED-NEXT:   Dependency {
LLVM-VERNEED-NEXT:     Version: 1
LLVM-VERNEED-NEXT:     Count: 1
LLVM-VERNEED-NEXT:     FileName: verneed2.so.0
LLVM-VERNEED-NEXT:     Entries [
LLVM-VERNEED-NEXT:       Entry {
LLVM-VERNEED-NEXT:         Hash: 1937
LLVM-VERNEED-NEXT:         Flags: 0x0
LLVM-VERNEED-NEXT:         Index: 4
LLVM-VERNEED-NEXT:         Name: v1
LLVM-VERNEED-NEXT:       }
LLVM-VERNEED-NEXT:     ]
LLVM-VERNEED-NEXT:   }
LLVM-VERNEED-NEXT: }

GNU-VERNEED:      Version symbols section '.gnu.version' contains 4 entries:
GNU-VERNEED-NEXT:  Addr: 0000000000010228  Offset: 0x000228  Link: 1 (.dynsym)
GNU-VERNEED-NEXT:   000:   0 (*local*)       2 (v3)            3 (v2)            4 (v1)

GNU-VERNEED: Dumper for .gnu.version_r is not implemented