brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 27fcd06 Raw
35 lines · plain
1# Show that llvm-readobj can handle ELF files where the section header table has2# been stripped, both for GNU and LLVM style output.3 4# RUN: yaml2obj %s -o %t.raw5# RUN: llvm-objcopy --strip-sections %t.raw %t.o6# RUN: llvm-readobj --file-headers --section-headers --symbols %t.o | FileCheck %s --check-prefix=LLVM7# RUN: llvm-readelf --file-headers --section-headers --symbols %t.o | FileCheck %s --check-prefix=GNU --allow-empty8# RUN: llvm-readelf --file-headers --section-details --symbols %t.o | FileCheck %s --check-prefix=GNU --allow-empty9 10# LLVM:      SectionHeaderCount:      011# LLVM:      StringTableSectionIndex: 012# LLVM:      Sections [13# LLVM-NEXT: ]14# LLVM-NEXT: Symbols [15# LLVM-NEXT: ]16 17# GNU:     Number of section headers:         018# GNU:     Section header string table index: 019# GNU-EMPTY:20# GNU:     There are no sections in this file.21# GNU-NOT: Symbol table '{{.*}}' contains {{.*}} entries22 23--- !ELF24FileHeader:25  Class: ELFCLASS6426  Data:  ELFDATA2LSB27  Type:  ET_REL28Sections:29  - Name: .text30    Type: SHT_PROGBITS31Symbols:32  - Name:    foobar33    Section: .text34    Binding: STB_GLOBAL35