546 lines · yaml
1## A user should be able to specify any arbitrary string table as the section2## header string table, including the symbol string table. This test covers3## various cases to do with this.4 5## Case 1: custom name specified for string table.6# RUN: yaml2obj --docnum=1 %s -o %t1 -DSHSTRTAB=.strings7# RUN: llvm-readelf -S -p .strings %t1 | FileCheck %s --check-prefix=CASE18 9# CASE1: There are 5 section headers10# CASE1-EMPTY:11# CASE1-NEXT: Section Headers:12# CASE1-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al13# CASE1-NEXT: [ 0] NULL14# CASE1-NEXT: [ 1] .foo{{ }}15# CASE1-NEXT: [ 2] .bar{{ }}16# CASE1-NEXT: [ 3] .strtab{{ }}17# CASE1-NEXT: [ 4] .strings STRTAB 0000000000000000 [[#%x,]] 00001c 00 0 0 118 19# CASE1: String dump of section '.strings':20# CASE1-NEXT: [ 1] .strings{{$}}21# CASE1-NEXT: [ a] .bar{{$}}22# CASE1-NEXT: [ f] .foo{{$}}23# CASE1-NEXT: [ 14] .strtab{{$}}24# CASE1-EMPTY:25 26--- !ELF27FileHeader:28 Class: ELFCLASS6429 Data: ELFDATA2LSB30 Type: ET_EXEC31 SectionHeaderStringTable: [[SHSTRTAB=<none>]]32Sections:33 - Name: .foo34 Type: SHT_PROGBITS35 - Name: [[OTHER=.bar]]36 Type: SHT_PROGBITS37 38## Case 2: reuse symbol string table.39# RUN: yaml2obj --docnum=2 %s -o %t2 -DSHSTRTAB=.strtab40# RUN: llvm-readelf -S -s -p .strtab %t2 | FileCheck %s --check-prefix=CASE241 42# CASE2: There are 5 section headers43# CASE2-EMPTY:44# CASE2-NEXT: Section Headers:45# CASE2-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al46# CASE2-NEXT: [ 0] NULL47# CASE2-NEXT: [ 1] .foo{{ }}48# CASE2-NEXT: [ 2] .bar{{ }}49# CASE2-NEXT: [ 3] .symtab{{ }}50# CASE2-NEXT: [ 4] .strtab STRTAB 0000000000000000 [[#%x,]] 000023 00 0 0 151 52# CASE2: Symbol table '.symtab' contains 3 entries:53# CASE2-NEXT: Num: {{.*}} Ndx Name54# CASE2-NEXT: 0: {{.*}} UND {{$}}55# CASE2-NEXT: 1: {{.*}} baz{{$}}56# CASE2-NEXT: 2: {{.*}} bob{{$}}57 58# CASE2: String dump of section '.strtab':59# CASE2-NEXT: [ 1] baz{{$}}60# CASE2-NEXT: [ 5] .bar{{$}}61# CASE2-NEXT: [ a] .foo{{$}}62# CASE2-NEXT: [ f] bob{{$}}63# CASE2-NEXT: [ 13] .strtab{{$}}64# CASE2-NEXT: [ 1b] .symtab{{$}}65# CASE2-EMPTY:66 67--- !ELF68FileHeader:69 Class: ELFCLASS6470 Data: ELFDATA2LSB71 Type: ET_EXEC72 SectionHeaderStringTable: [[SHSTRTAB]]73Sections:74 - Name: .foo75 Type: SHT_PROGBITS76 - Name: .bar77 Type: SHT_PROGBITS78Symbols:79 - Name: baz80 - Name: bob81 82## Case 3: reuse dynamic string table.83# RUN: yaml2obj --docnum=3 %s -o %t3 -DSHSTRTAB=.dynstr84# RUN: llvm-readelf -S --dyn-syms -p .dynstr %t3 | FileCheck %s --check-prefix=CASE385 86--- !ELF87FileHeader:88 Class: ELFCLASS6489 Data: ELFDATA2LSB90 Type: ET_EXEC91 SectionHeaderStringTable: [[SHSTRTAB]]92Sections:93 - Name: .foo94 Type: SHT_PROGBITS95 - Name: .bar96 Type: SHT_PROGBITS97DynamicSymbols:98 - Name: baz99 - Name: bob100 101# CASE3: There are 6 section headers102# CASE3-EMPTY:103# CASE3-NEXT: Section Headers:104# CASE3-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al105# CASE3-NEXT: [ 0] NULL106# CASE3-NEXT: [ 1] .foo{{ }}107# CASE3-NEXT: [ 2] .bar{{ }}108# CASE3-NEXT: [ 3] .dynsym{{ }}109# CASE3-NEXT: [ 4] .dynstr STRTAB 0000000000000048 [[#%x,]] 00002b 00 A 0 0 1110# CASE3-NEXT: [ 5] .strtab{{ }}111 112# CASE3: Symbol table '.dynsym' contains 3 entries:113# CASE3-NEXT: Num: {{.*}} Ndx Name114# CASE3-NEXT: 0: {{.*}} UND {{$}}115# CASE3-NEXT: 1: {{.*}} baz{{$}}116# CASE3-NEXT: 2: {{.*}} bob{{$}}117 118# CASE3: String dump of section '.dynstr':119# CASE3-NEXT: [ 1] baz{{$}}120# CASE3-NEXT: [ 5] .dynstr{{$}}121# CASE3-NEXT: [ d] .bar{{$}}122# CASE3-NEXT: [ 12] .foo{{$}}123# CASE3-NEXT: [ 17] .dynsym{{$}}124# CASE3-NEXT: [ 1f] bob{{$}}125# CASE3-NEXT: [ 23] .strtab{{$}}126# CASE3-EMPTY:127 128## Case 4: shstrtab specified to be otherwise ungenerated non-strtab implicit129## section.130# RUN: yaml2obj --docnum=1 %s -o %t4 -DSHSTRTAB=.symtab131# RUN: llvm-readelf -S -p .symtab %t4 | FileCheck %s --check-prefix=CASE4132 133# CASE4: There are 5 section headers134# CASE4-EMPTY:135# CASE4-NEXT: Section Headers:136# CASE4-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al137# CASE4-NEXT: [ 0] NULL138# CASE4-NEXT: [ 1] .foo{{ }}139# CASE4-NEXT: [ 2] .bar{{ }}140# CASE4-NEXT: [ 3] .strtab{{ }}141# CASE4-NEXT: [ 4] .symtab STRTAB 0000000000000000 [[#%x,]] 00001b 00 0 0 1142 143# CASE4: String dump of section '.symtab':144# CASE4-NEXT: [ 1] .bar{{$}}145# CASE4-NEXT: [ 6] .foo{{$}}146# CASE4-NEXT: [ b] .strtab{{$}}147# CASE4-NEXT: [ 13] .symtab{{$}}148 149## Case 5: shstrtab specified to be otherwise ungenerated .dynstr section. In150## this case, the SHF_ALLOC flag will be set.151# RUN: yaml2obj --docnum=1 %s -o %t5 -DSHSTRTAB=.dynstr152# RUN: llvm-readelf -S -p .dynstr %t5 | FileCheck %s --check-prefix=CASE5153 154# CASE5: There are 5 section headers155# CASE5-EMPTY:156# CASE5-NEXT: Section Headers:157# CASE5-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al158# CASE5-NEXT: [ 0] NULL159# CASE5-NEXT: [ 1] .foo{{ }}160# CASE5-NEXT: [ 2] .bar{{ }}161# CASE5-NEXT: [ 3] .strtab{{ }}162# CASE5-NEXT: [ 4] .dynstr STRTAB 0000000000000001 [[#%x,]] 00001b 00 A 0 0 1163 164# CASE5: String dump of section '.dynstr':165# CASE5-NEXT: [ 1] .dynstr{{$}}166# CASE5-NEXT: [ 9] .bar{{$}}167# CASE5-NEXT: [ e] .foo{{$}}168# CASE5-NEXT: [ 13] .strtab{{$}}169 170## Case 6: shstrtab specified to be otherwise ungenerated .debug_str section. In171## this case, the sh_entsize will be set to 1.172# RUN: yaml2obj --docnum=1 %s -o %t6 -DSHSTRTAB=.debug_str173# RUN: llvm-readelf -S -p .debug_str %t6 | FileCheck %s --check-prefix=CASE6174 175# CASE6: There are 5 section headers176# CASE6-EMPTY:177# CASE6-NEXT: Section Headers:178# CASE6-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al179# CASE6-NEXT: [ 0] NULL180# CASE6-NEXT: [ 1] .foo{{ }}181# CASE6-NEXT: [ 2] .bar{{ }}182# CASE6-NEXT: [ 3] .strtab{{ }}183# CASE6-NEXT: [ 4] .debug_str STRTAB 0000000000000000 [[#%x,]] 00001e 01 0 0 1184 185# CASE6: String dump of section '.debug_str':186# CASE6-NEXT: [ 1] .debug_str{{$}}187# CASE6-NEXT: [ c] .bar{{$}}188# CASE6-NEXT: [ 11] .foo{{$}}189# CASE6-NEXT: [ 16] .strtab{{$}}190 191## Case 7: shstrtab specified to be the .symtab section, when there are symbols.192## This triggers an error (since the symbols cannot be represented in the193## section as section names).194# RUN: not yaml2obj --docnum=2 %s -o %t7 -DSHSTRTAB=.symtab 2>&1 | FileCheck %s --check-prefix=ERR1195 196# ERR1: error: cannot use '.symtab' as the section header name table when there are symbols197 198## Case 8: shstrtab specified to be the .dynsym section, when there are dynamic199## symbols. This triggers an error (since the symbols cannot be represented in200## the section as section names).201# RUN: not yaml2obj --docnum=3 %s -o %t8 -DSHSTRTAB=.dynsym 2>&1 | FileCheck %s --check-prefix=ERR2202 203# ERR2: error: cannot use '.dynsym' as the section header name table when there are dynamic symbols204 205## Case 9: shstrtab specified to be the .debug_str section, when there are DWARF206## debug strings. This triggers an error.207# RUN: not yaml2obj --docnum=4 %s -o %t9 2>&1 | FileCheck %s --check-prefix=ERR3208 209# ERR3: error: cannot use '.debug_str' as the section header name table when it is needed for DWARF output210 211--- !ELF212FileHeader:213 Class: ELFCLASS64214 Data: ELFDATA2LSB215 Type: ET_EXEC216 SectionHeaderStringTable: .debug_str217DWARF:218 debug_str:219 - a220 221## Case 10: can explicitly specifiy ".shstrtab" as shstrtab. Output will be the222## same as if it wasn't sepcified at all.223# RUN: yaml2obj --docnum=1 %s -o %t10 -DSHSTRTAB=.shstrtab224# RUN: llvm-readelf -S -p .shstrtab %t10 | FileCheck %s --check-prefix=CASE10225# RUN: yaml2obj --docnum=1 %s -o %t10.default226# RUN: cmp %t10 %t10.default227 228# CASE10: There are 5 section headers229# CASE10-EMPTY:230# CASE10-NEXT: Section Headers:231# CASE10-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al232# CASE10-NEXT: [ 0] NULL233# CASE10-NEXT: [ 1] .foo{{ }}234# CASE10-NEXT: [ 2] .bar{{ }}235# CASE10-NEXT: [ 3] .strtab{{ }}236# CASE10-NEXT: [ 4] .shstrtab STRTAB 0000000000000000 [[#%x,]] 00001d 00 0 0 1237 238# CASE10: String dump of section '.shstrtab':239# CASE10-NEXT: [ 1] .bar{{$}}240# CASE10-NEXT: [ 6] .foo{{$}}241# CASE10-NEXT: [ b] .shstrtab{{$}}242# CASE10-NEXT: [ 15] .strtab{{$}}243# CASE10-EMPTY:244 245## Case 11: can specify custom shstrtab properties.246## FIXME: when the section is listed explicitly, the sh_addralign value is 0 if247## not overwritten, which is inconsistent with when the section is not248## specified at all.249# RUN: yaml2obj --docnum=5 %s -o %t11 -DENTSIZE=2250# RUN: llvm-readelf -S -p .strings %t11 | FileCheck %s --check-prefix=CASE11251 252# CASE11: There are 5 section headers253# CASE11-EMPTY:254# CASE11-NEXT: Section Headers:255# CASE11-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al256# CASE11-NEXT: [ 0] NULL257# CASE11-NEXT: [ 1] .foo{{ }}258# CASE11-NEXT: [ 2] .strings STRTAB 0000000000000000 [[#%x,]] 00001c 02 0 0 0259# CASE11-NEXT: [ 3] .bar{{ }}260# CASE11-NEXT: [ 4] .strtab{{ }}261 262# CASE11: String dump of section '.strings':263# CASE11-NEXT: [ 1] .strings{{$}}264# CASE11-NEXT: [ a] .bar{{$}}265# CASE11-NEXT: [ f] .foo{{$}}266# CASE11-NEXT: [ 14] .strtab{{$}}267# CASE11-EMPTY:268 269--- !ELF270FileHeader:271 Class: ELFCLASS64272 Data: ELFDATA2LSB273 Type: ET_EXEC274 SectionHeaderStringTable: .strings275Sections:276 - Name: .foo277 Type: SHT_PROGBITS278 - Name: .strings279 Type: [[TYPE=SHT_STRTAB]]280 EntSize: [[ENTSIZE=<none>]]281 Size: [[SIZE=<none>]]282 Content: [[CONTENT=<none>]]283 - Name: .bar284 Type: SHT_PROGBITS285 286## Case 12: shstrtab does not have SHT_STRTAB type. Default properties will be287## derived from the specified section type.288# RUN: yaml2obj --docnum=5 %s -o %t12 -DTYPE=SHT_RELA289# RUN: llvm-readelf -S %t12 | FileCheck %s --check-prefix=CASE12290 291# CASE12: There are 5 section headers292# CASE12-EMPTY:293# CASE12-NEXT: Section Headers:294# CASE12-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al295# CASE12-NEXT: [ 0] NULL296# CASE12-NEXT: [ 1] .foo{{ }}297# CASE12-NEXT: [ 2] .strings RELA 0000000000000000 [[#%x,]] 00001c 18 0 0 0298# CASE12-NEXT: [ 3] .bar{{ }}299# CASE12-NEXT: [ 4] .strtab{{ }}300 301## Case 13: shstrtab has specified Content. The specified content overrides the302## implicitly generated content.303# RUN: yaml2obj --docnum=5 %s -o %t13 -DCONTENT="00616263646566676800696a6b6c006d6e6f70007172737475767700787a7b7c00"304# RUN: llvm-readelf -S %t13 | FileCheck %s --check-prefix=CASE13305 306# CASE13: There are 5 section headers307# CASE13-EMPTY:308# CASE13-NEXT: Section Headers:309# CASE13-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al310# CASE13-NEXT: [ 0] NULL311# CASE13-NEXT: [ 1] mnop{{ }}312# CASE13-NEXT: [ 2] abcdefgh STRTAB 0000000000000000 [[#%x,]] 000021 00 0 0 0313# CASE13-NEXT: [ 3] ijkl{{ }}314# CASE13-NEXT: [ 4] qrstuvw{{ }}315 316## Case 14: shstrtab has specified Size. The section will be filled with zeros317## to the requested size.318# RUN: yaml2obj --docnum=5 %s -o %t14 -DSIZE=32319# RUN: llvm-readelf -S -p 2 %t14 | FileCheck %s --check-prefix=CASE14320 321# CASE14: There are 5 section headers322# CASE14-EMPTY:323# CASE14-NEXT: Section Headers:324# CASE14-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al325# CASE14-NEXT: [ 0] NULL326# CASE14-NEXT: [ 1] PROGBITS327# CASE14-NEXT: [ 2] STRTAB 0000000000000000 [[#%x,]] 000020 00 0 0 0328# CASE14-NEXT: [ 3] PROGBITS329# CASE14-NEXT: [ 4] STRTAB330 331# CASE14: String dump of section '':332# CASE14-EMPTY:333 334## Case 15: custom shstrtab and no section header table. The section header335## names shouldn't appear anywhere in the output file.336# RUN: yaml2obj --docnum=6 %s -o %t15337# RUN: FileCheck %s --input-file=%t15 \338# RUN: --implicit-check-not=.strings --implicit-check-not=.foo \339# RUN: --implicit-check-not=.bar340 341--- !ELF342FileHeader:343 Class: ELFCLASS64344 Data: ELFDATA2LSB345 Type: ET_EXEC346 SectionHeaderStringTable: .strings347Sections:348 - Name: .foo349 Type: SHT_PROGBITS350 - Name: .bar351 Type: SHT_PROGBITS352 - Type: SectionHeaderTable353 NoHeaders: true354 355## Case 16: custom shstrtab can be reordered in the section header table.356# RUN: yaml2obj --docnum=7 %s -o %t16357# RUN: llvm-readelf -S %t16 | FileCheck %s --check-prefix=CASE16358 359# CASE16: There are 5 section headers360# CASE16-EMPTY:361# CASE16-NEXT: Section Headers:362# CASE16-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al363# CASE16-NEXT: [ 0] NULL364# CASE16-NEXT: [ 1] .foo{{ }}365# CASE16-NEXT: [ 2] .strings STRTAB 0000000000000000 [[#%x,]] 00001c 00 0 0 1366# CASE16-NEXT: [ 3] .bar{{ }}367# CASE16-NEXT: [ 4] .strtab{{ }}368 369--- !ELF370FileHeader:371 Class: ELFCLASS64372 Data: ELFDATA2LSB373 Type: ET_EXEC374 SectionHeaderStringTable: .strings375Sections:376 - Name: .foo377 Type: SHT_PROGBITS378 - Name: .bar379 Type: SHT_PROGBITS380 - Type: SectionHeaderTable381 Sections:382 - Name: .foo383 - Name: .strings384 - Name: .bar385 - Name: .strtab386 387## Case 17: custom shstrtab section header can be excluded.388# RUN: yaml2obj --docnum=8 %s -o %t17389# RUN: llvm-readelf -h -S %t17 | FileCheck %s --check-prefix=CASE17390 391# CASE17: Section header string table index: 0392# CASE17: There are 4 section headers393# CASE17-EMPTY:394# CASE17-NEXT: Section Headers:395# CASE17-NEXT: [Nr] Name Type396# CASE17-NEXT: [ 0] <no-strings> NULL397# CASE17-NEXT: [ 1] <no-strings> PROGBITS398# CASE17-NEXT: [ 2] <no-strings> PROGBITS399# CASE17-NEXT: [ 3] <no-strings> STRTAB400 401--- !ELF402FileHeader:403 Class: ELFCLASS64404 Data: ELFDATA2LSB405 Type: ET_EXEC406 SectionHeaderStringTable: .strings407Sections:408 - Name: .foo409 Type: SHT_PROGBITS410 - Name: .bar411 Type: SHT_PROGBITS412 - Type: SectionHeaderTable413 Sections:414 - Name: .foo415 - Name: .bar416 - Name: .strtab417 Excluded:418 - Name: .strings419 420## Case 18: section name for excluded section does not appear in custom421## shstrtab.422# RUN: yaml2obj --docnum=9 %s -o %t18423# RUN: llvm-readelf -S -p .strings %t18 | FileCheck %s --check-prefix=CASE18424 425# CASE18: There are 4 section headers426# CASE18-EMPTY:427# CASE18-NEXT: Section Headers:428# CASE18-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al429# CASE18-NEXT: [ 0] NULL430# CASE18-NEXT: [ 1] .foo{{ }}431# CASE18-NEXT: [ 2] .strings STRTAB 0000000000000000 [[#%x,]] 000017 00 0 0 1432# CASE18-NEXT: [ 3] .strtab{{ }}433 434# CASE18: String dump of section '.strings':435# CASE18-NEXT: [ 1] .strings436# CASE18-NEXT: [ a] .foo437# CASE18-NEXT: [ f] .strtab438# CASE18-EMPTY:439 440--- !ELF441FileHeader:442 Class: ELFCLASS64443 Data: ELFDATA2LSB444 Type: ET_EXEC445 SectionHeaderStringTable: .strings446Sections:447 - Name: .foo448 Type: SHT_PROGBITS449 - Name: .bar450 Type: SHT_PROGBITS451 - Type: SectionHeaderTable452 Sections:453 - Name: .foo454 - Name: .strings455 - Name: .strtab456 Excluded:457 - Name: .bar458 459## Case 19: custom shstrtab can have a uniqued name.460# RUN: yaml2obj --docnum=1 %s -o %t19 '-DSHSTRTAB=.strings (1)' '-DOTHER=.strings (0)'461# RUN: llvm-readelf -S -p 4 %t19 | FileCheck %s --check-prefix=CASE19462 463# CASE19: There are 5 section headers464# CASE19-EMPTY:465# CASE19-NEXT: Section Headers:466# CASE19-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al467# CASE19-NEXT: [ 0] NULL468# CASE19-NEXT: [ 1] .foo{{ }}469# CASE19-NEXT: [ 2] .strings PROGBITS470# CASE19-NEXT: [ 3] .strtab{{ }}471# CASE19-NEXT: [ 4] .strings STRTAB 0000000000000000 [[#%x,]] 000017 00 0 0 1472 473# CASE19: String dump of section '.strings':474# CASE19-NEXT: [ 1] .strings{{$}}475# CASE19-NEXT: [ a] .foo{{$}}476# CASE19-NEXT: [ f] .strtab{{$}}477# CASE19-EMPTY:478 479## Case 20: custom shstrtab named ".strtab" with uniquifying ID.480# RUN: yaml2obj --docnum=2 %s -o %t20 '-DSHSTRTAB=.strtab (1)'481# RUN: llvm-readelf -S -s -p 4 -p 5 %t20 | FileCheck %s --check-prefix=CASE20482 483# CASE20: There are 6 section headers484# CASE20-EMPTY:485# CASE20-NEXT: Section Headers:486# CASE20-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al487# CASE20-NEXT: [ 0] NULL488# CASE20-NEXT: [ 1] .foo{{ }}489# CASE20-NEXT: [ 2] .bar{{ }}490# CASE20-NEXT: [ 3] .symtab{{ }}491# CASE20-NEXT: [ 4] .strtab STRTAB [[#%x,]] [[#%x,]] 000009 00 0 0 1492# CASE20-NEXT: [ 5] .strtab STRTAB 0000000000000000 [[#%x,]] 00001b 00 0 0 1493 494# CASE20: Symbol table '.symtab' contains 3 entries:495# CASE20-NEXT: Num: {{.*}} Ndx Name496# CASE20-NEXT: 0: {{.*}} UND {{$}}497# CASE20-NEXT: 1: {{.*}} baz{{$}}498# CASE20-NEXT: 2: {{.*}} bob{{$}}499 500# CASE20: String dump of section '.strtab':501# CASE20-NEXT: [ 1] baz502# CASE20-NEXT: [ 5] bob503# CASE20-EMPTY:504 505# CASE20: String dump of section '.strtab':506# CASE20-NEXT: [ 1] .bar{{$}}507# CASE20-NEXT: [ 6] .foo{{$}}508# CASE20-NEXT: [ b] .strtab{{$}}509# CASE20-NEXT: [ 13] .symtab{{$}}510# CASE20-EMPTY:511 512## Case 21: custom shstrtab named ".dynstr" with uniquifying ID.513# RUN: yaml2obj --docnum=3 %s -o %t21 '-DSHSTRTAB=.dynstr (1)'514# RUN: llvm-readelf -S --dyn-syms -p 4 -p 6 %t21 | FileCheck %s --check-prefix=CASE21515 516# CASE21: There are 7 section headers517# CASE21-EMPTY:518# CASE21-NEXT: Section Headers:519# CASE21-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al520# CASE21-NEXT: [ 0] NULL521# CASE21-NEXT: [ 1] .foo{{ }}522# CASE21-NEXT: [ 2] .bar{{ }}523# CASE21-NEXT: [ 3] .dynsym{{ }}524# CASE21-NEXT: [ 4] .dynstr STRTAB [[#%x,]] [[#%x,]] 000009 00 A 0 0 1525# CASE21-NEXT: [ 5] .strtab{{ }}526# CASE21-NEXT: [ 6] .dynstr STRTAB 0000000000000000 [[#%x,]] 000023 00 0 0 1527 528# CASE21: Symbol table '.dynsym' contains 3 entries:529# CASE21-NEXT: Num: {{.*}} Ndx Name530# CASE21-NEXT: 0: {{.*}} UND {{$}}531# CASE21-NEXT: 1: {{.*}} baz{{$}}532# CASE21-NEXT: 2: {{.*}} bob{{$}}533 534# CASE21: String dump of section '.dynstr':535# CASE21-NEXT: [ 1] baz536# CASE21-NEXT: [ 5] bob537# CASE21-EMPTY:538 539# CASE21: String dump of section '.dynstr':540# CASE21-NEXT: [ 1] .dynstr{{$}}541# CASE21-NEXT: [ 9] .bar{{$}}542# CASE21-NEXT: [ e] .foo{{$}}543# CASE21-NEXT: [ 13] .dynsym{{$}}544# CASE21-NEXT: [ 1b] .strtab{{$}}545# CASE21-EMPTY:546