Lines Matching full:hash

1 ## Check how the SHT_HASH section is dumped with --hash-table.
6 # RUN: llvm-readobj --hash-table %t.x64 | FileCheck %s --check-prefix=HASH
7 # RUN: llvm-readelf --hash-table %t.x64 | FileCheck %s --check-prefix=HASH
9 # RUN: llvm-readobj --hash-table %t.x32 | FileCheck %s --check-prefix=HASH
10 # RUN: llvm-readelf --hash-table %t.x32 | FileCheck %s --check-prefix=HASH
12 # HASH: HashTable {
13 # HASH-NEXT: Num Buckets: 2
14 # HASH-NEXT: Num Chains: 3
15 # HASH-NEXT: Buckets: [1, 2]
16 # HASH-NEXT: Chains: [3, 4, 5]
17 # HASH-NEXT: }
26 - Name: .hash
42 FirstSec: .hash
45 ## Document that we ignore the sh_entsize value when dumping the hash section.
51 # RUN: llvm-readobj --hash-table %t.x64.ent8 | FileCheck %s --check-prefix=HASH
52 # RUN: llvm-readelf --hash-table %t.x64.ent8 | FileCheck %s --check-prefix=HASH
53 # RUN: llvm-readobj --hash-table %t.x32.ent8 | FileCheck %s --check-prefix=HASH
54 # RUN: llvm-readelf --hash-table %t.x32.ent8 | FileCheck %s --check-prefix=HASH
56 ## We don't support dumping hash tables on EM_S390 and EM_ALPHA platforms and report a warning.
58 ## of hash entries in the hash table must be 4.
61 # RUN: llvm-readobj --hash-table %t.s390 2>&1 | FileCheck %s -DFILE=%t.s390 --check-prefixes=WARN-H…
62 # RUN: llvm-readelf --hash-table %t.s390 2>&1 | FileCheck %s -DFILE=%t.s390 --check-prefixes=WARN-H…
64 # WARN-HASH: HashTable {
65 # WARN-HASH-NEXT: warning: '[[FILE]]': the hash table at 0x78 is not supported: it contains non-sta…
66 # WARN-HASH-NEXT: }
69 # RUN: llvm-readobj --hash-table %t.alpha 2>&1 | FileCheck %s -DFILE=%t.alpha --check-prefixes=WARN…
70 # RUN: llvm-readelf --hash-table %t.alpha 2>&1 | FileCheck %s -DFILE=%t.alpha --check-prefixes=WARN…
72 ## We don't report warnings about the unsupported hash table on EM_S390 and EM_ALPHA platforms
73 ## when --hash-table is not requested.
84 # RUN: llvm-readobj --hash-table %t.noshdr 2>&1 | \
86 # RUN: llvm-readelf --hash-table %t.noshdr 2>&1 | \
102 - Name: .hash
120 FirstSec: .hash
130 # RUN: llvm-readobj --hash-table %t.ent.size 2>&1 | \
132 # RUN: llvm-readelf --hash-table %t.ent.size 2>&1 | \
135 ## Document we need the DT_HASH dynamic tag to locate the hash table.
138 # RUN: llvm-readobj --hash-table %t.no.dyntag 2>&1 | \
140 # RUN: llvm-readelf --hash-table %t.no.dyntag 2>&1 | \
150 # RUN: llvm-readelf --hash-table %t4.o 2>&1 | FileCheck %s --check-prefix=ERR1 -DFILE=%t4.o
151 # RUN: llvm-readobj --hash-table %t4.o 2>&1 | FileCheck %s --check-prefix=ERR1 -DFILE=%t4.o
154 # ERR1-NEXT: warning: '[[FILE]]': the hash table at offset 0x2b1 goes past the end of the file (0x…
163 - Name: .hash
180 FirstSec: .hash
183 ## Check we report a warning when the hash table goes past the end of the file.
185 ## Case A.1: the hash table ends right before the EOF. We have a broken nbucket
188 # RUN: llvm-readelf --hash-table %t5.1.o 2>&1 | \
190 # RUN: llvm-readobj --hash-table %t5.1.o 2>&1 | \
202 ## Case A.2: the hash table ends 1 byte past the EOF. We have a broken nbucket
205 # RUN: llvm-readelf --hash-table %t5.2.o 2>&1 | \
207 # RUN: llvm-readobj --hash-table %t5.2.o 2>&1 | \
213 # ERR2-NEXT: warning: '[[FILE]]': the hash table at offset 0x54 goes past the end of the file (0x1…
216 ## Case B.1: the hash table ends right before the EOF. We have a broken nchain
219 # RUN: llvm-readelf --hash-table %t5.3.o 2>&1 | \
221 # RUN: llvm-readobj --hash-table %t5.3.o 2>&1 | \
224 # NOERR2: warning: '[[FILE]]': hash table nchain (93) differs from symbol count derived from S…
225 …': the size (0x5d0) of the dynamic symbol table at 0x78, derived from the hash table, goes past th…
235 ## Case B.2: the hash table ends 1 byte past the EOF. We have a broken nchain
238 # RUN: llvm-readelf --hash-table %t5.4.o 2>&1 | \
240 # RUN: llvm-readobj --hash-table %t5.4.o 2>&1 | \
243 # ERR3: warning: '[[FILE]]': hash table nchain (94) differs from symbol count derived from SHT…
244 …': the size (0x5e0) of the dynamic symbol table at 0x78, derived from the hash table, goes past th…
248 # ERR3-NEXT: warning: '[[FILE]]': the hash table at offset 0x54 goes past the end of the file (0x1…
257 - Name: .hash
275 FirstSec: .hash
278 ## Show we do not duplicate warnings when printing both the hash table and the hash histogram.
279 ## Note that --elf-hash-histogram is only implemented for llvm-readelf currently.
281 # RUN: llvm-readelf --hash-table --elf-hash-histogram %t4.o 2>&1 \
284 # SINGLE-WARN: warning: '[[FILE]]': hash table nchain (0) differs from symbol count derived fr…
286 # SINGLE-WARN-NEXT: warning: '[[FILE]]': the hash table at offset 0x2b1 goes past the end of the fi…