1## Check we are able to set a custom sh_name field for different sections 2## and that doing this does not affect the names stored in the string table. 3 4# RUN: yaml2obj %s -o %t1 5# RUN: llvm-readobj --sections --section-data %t1 | FileCheck %s 6 7# CHECK: Index: 1 8# CHECK-NEXT: Name:{{.* }}(1) 9# CHECK: Index: 2 10# CHECK-NEXT: Name:{{.* }}(2) 11# CHECK: Index: 3 12# CHECK-NEXT: Name:{{.* }}(3) 13# CHECK: Index: 4 14# CHECK-NEXT: Name:{{.* }}(4) 15# CHECK: Index: 5 16# CHECK-NEXT: Name:{{.* }}(5) 17# CHECK: Index: 6 18# CHECK-NEXT: Name:{{.* }}(6) 19# CHECK: Index: 7 20# CHECK-NEXT: Name:{{.* }}(7) 21# CHECK: Index: 8 22# CHECK-NEXT: Name:{{.* }}(8) 23# CHECK: Index: 9 24# CHECK-NEXT: Name:{{.* }}(9) 25# CHECK: Index: 10 26# CHECK-NEXT: Name:{{.* }}(10) 27# CHECK: Index: 11 28# CHECK-NEXT: Name:{{.* }}(11) 29 30# CHECK: Name: .shstrtab 31# CHECK: SectionData ( 32# CHECK-NEXT: |..nobits..regula| 33# CHECK-NEXT: |r..gnu.version_r| 34# CHECK-NEXT: |..group..gnu.ver| 35# CHECK-NEXT: |sion..dynsym..gn| 36# CHECK-NEXT: |u.version_d..dyn| 37# CHECK-NEXT: |amic..shstrtab..| 38# CHECK-NEXT: |strtab..symtab..| 39# CHECK-NEXT: |rela.| 40# CHECK-NEXT: ) 41 42--- !ELF 43FileHeader: 44 Class: ELFCLASS64 45 Data: ELFDATA2LSB 46 Type: ET_REL 47Sections: 48 - Name: .dynsym 49 Type: SHT_DYNSYM 50 ShName: 0x000000001 51 - Name: .symtab 52 Type: SHT_SYMTAB 53 ShName: 0x000000002 54 - Name: .dynamic 55 Type: SHT_DYNAMIC 56 ShName: 0x000000003 57 - Name: .rela 58 Type: SHT_RELA 59 ShName: 0x000000004 60 - Name: .nobits 61 Type: SHT_NOBITS 62 ShName: 0x000000005 63 - Name: .group 64 Type: SHT_GROUP 65 ShName: 0x000000006 66 Members: 67 - Name: .gnu.version 68 Type: SHT_GNU_versym 69 Entries: [ ] 70 ShName: 0x000000007 71 - Name: .gnu.version_r 72 Type: SHT_GNU_verneed 73 Info: 0x0000000000000001 74 ShName: 0x000000008 75 Dependencies: 76 - Name: .gnu.version_d 77 Type: SHT_GNU_verdef 78 Info: 0x0000000000000001 79 ShName: 0x000000009 80 Entries: 81 - Name: .regular 82 Type: SHT_PROGBITS 83 ShName: 0x00000000A 84 - Name: .strtab 85 Type: SHT_STRTAB 86 ShName: 0x00000000B 87