Skip to content

Commit c44a9b5

Browse files
author
Georgii Rymar
committed
[llvm-readobj] - Simplify elf-hash-symbols.test. NFCI.
It converts binary contents of .hash and .gnu.hash that were generated by a linker to YAML descriptions. I've also dropped Shift2 and BloomFilter values because they are not needed here. Differential revision: https://reviews.llvm.org/D69881
1 parent 17eb12f commit c44a9b5

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

llvm/test/tools/llvm-readobj/elf-hash-symbols.test

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,22 @@ FileHeader:
2929
Type: ET_DYN
3030
Machine: EM_386
3131
Sections:
32-
## The contents of .hash and .gnu.hash were generated by a linker.
3332
- Name: .hash
3433
Type: SHT_HASH
3534
Flags: [ SHF_ALLOC ]
3635
Link: .dynsym
37-
Content: '0300000006000000010000000000000000000000000000000500000004000000020000000000000003000000'
36+
Bucket: [ 1, 0, 0 ]
37+
Chain: [ 0, 5, 4, 2, 0, 3 ]
3838
- Name: .gnu.hash
3939
Type: SHT_GNU_HASH
4040
Flags: [ SHF_ALLOC ]
4141
Link: .dynsym
42-
Content: 0300000002000000010000000500000048991200000000000200000004000000685C880B9169880BF46D880BCB60880B
42+
Header:
43+
SymNdx: 0x2
44+
Shift2: 0x0
45+
BloomFilter: [ 0x0 ]
46+
HashBuckets: [ 0x0, 0x2, 0x4 ]
47+
HashValues: [ 0x0B885C68, 0x0B886991, 0x0B886DF4, 0x0B8860CB ]
4348
- Name: .dynamic
4449
Type: SHT_DYNAMIC
4550
Flags: [ SHF_ALLOC ]
@@ -109,17 +114,22 @@ FileHeader:
109114
Type: ET_DYN
110115
Machine: EM_X86_64
111116
Sections:
112-
## The contents of .hash and .gnu.hash were generated by a linker.
113117
- Name: .hash
114118
Type: SHT_HASH
115119
Flags: [ SHF_ALLOC ]
116120
Link: .dynsym
117-
Content: '0300000006000000010000000000000000000000000000000500000004000000020000000000000003000000'
121+
Bucket: [ 1, 0, 0 ]
122+
Chain: [ 0, 5, 4, 2, 0, 3 ]
118123
- Name: .gnu.hash
119124
Type: SHT_GNU_HASH
120125
Flags: [ SHF_ALLOC ]
121126
Link: .dynsym
122-
Content: 030000000200000001000000060000000808020040019200000000000200000004000000685C880B9169880BF46D880BCB60880B
127+
Header:
128+
SymNdx: 0x2
129+
Shift2: 0x0
130+
BloomFilter: [ 0x0 ]
131+
HashBuckets: [ 0x00000000, 0x00000002, 0x00000004 ]
132+
HashValues: [ 0x0B885C68, 0x0B886991, 0x0B886DF4, 0x0B8860CB ]
123133
- Name: .dynamic
124134
Type: SHT_DYNAMIC
125135
Flags: [ SHF_ALLOC ]
@@ -185,12 +195,12 @@ FileHeader:
185195
Type: ET_DYN
186196
Machine: EM_386
187197
Sections:
188-
## The contents of .hash was generated by a linker.
189198
- Name: .hash
190199
Type: SHT_HASH
191200
Flags: [ SHF_ALLOC ]
192201
Link: .dynsym
193-
Content: '0300000006000000010000000000000000000000000000000500000004000000020000000000000003000000'
202+
Bucket: [ 1, 0, 0 ]
203+
Chain: [ 0, 5, 4, 2, 0, 3 ]
194204
- Name: .dynamic
195205
Type: SHT_DYNAMIC
196206
Flags: [ SHF_ALLOC ]
@@ -246,12 +256,16 @@ FileHeader:
246256
Type: ET_DYN
247257
Machine: EM_386
248258
Sections:
249-
## The contents of .gnu.hash was generated by a linker.
250259
- Name: .gnu.hash
251260
Type: SHT_GNU_HASH
252261
Flags: [ SHF_ALLOC ]
253262
Link: .dynsym
254-
Content: 0300000002000000010000000500000048991200000000000200000004000000685C880B9169880BF46D880BCB60880B
263+
Header:
264+
SymNdx: 0x2
265+
Shift2: 0x0
266+
BloomFilter: [ 0x0 ]
267+
HashBuckets: [ 0x0, 0x2, 0x4 ]
268+
HashValues: [ 0x0B885C68, 0x0B886991, 0x0B886DF4, 0x0B8860CB ]
255269
- Name: .dynamic
256270
Type: SHT_DYNAMIC
257271
Flags: [ SHF_ALLOC ]

0 commit comments

Comments
 (0)