remove-symtab.test 1.54 KB
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -R .symtab %t %t2
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s

!ELF
FileHeader:
  Class:           ELFCLASS64
  Data:            ELFDATA2LSB
  Type:            ET_REL
  Machine:         EM_X86_64

#CHECK: SectionHeaderCount: 3

#CHECK:        Sections [
#CHECK-NEXT:     Section {
#CHECK-NEXT:       Index: 0
#CHECK-NEXT:       Name:  (0)
#CHECK-NEXT:       Type: SHT_NULL (0x0)
#CHECK-NEXT:       Flags [ (0x0)
#CHECK-NEXT:       ]
#CHECK-NEXT:       Address: 0x0
#CHECK-NEXT:       Offset: 0x0
#CHECK-NEXT:       Size: 0
#CHECK-NEXT:       Link: 0
#CHECK-NEXT:       Info: 0
#CHECK-NEXT:       AddressAlignment: 0
#CHECK-NEXT:       EntrySize: 0
#CHECK-NEXT:     }
#CHECK-NEXT:     Section {
#CHECK-NEXT:       Index: 1
#CHECK-NEXT:       Name: .strtab
#CHECK-NEXT:       Type: SHT_STRTAB (0x3)
#CHECK-NEXT:       Flags [ (0x0)
#CHECK-NEXT:       ]
#CHECK-NEXT:       Address: 0x0
#CHECK-NEXT:       Offset:
#CHECK-NEXT:       Size: 1
#CHECK-NEXT:       Link: 0
#CHECK-NEXT:       Info: 0
#CHECK-NEXT:       AddressAlignment: 1
#CHECK-NEXT:       EntrySize: 0
#CHECK-NEXT:     }
#CHECK-NEXT:     Section {
#CHECK-NEXT:       Index: 2
#CHECK-NEXT:       Name: .shstrtab (1)
#CHECK-NEXT:       Type: SHT_STRTAB (0x3)
#CHECK-NEXT:       Flags [ (0x0)
#CHECK-NEXT:       ]
#CHECK-NEXT:       Address: 0x0
#CHECK-NEXT:       Offset:
#CHECK-NEXT:       Size:
#CHECK-NEXT:       Link: 0
#CHECK-NEXT:       Info: 0
#CHECK-NEXT:       AddressAlignment: 1
#CHECK-NEXT:       EntrySize: 0
#CHECK-NEXT:     }
#CHECK-NEXT:   ]