brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · 73b0cd2 Raw
101 lines · plain
1## Check how llvm-readobj prints sections with --sections.2## We test the --sections flag for llvm-readelf in the gnu-sections.test.3 4# RUN: yaml2obj %s -o %t645# RUN: llvm-readobj --sections %t64 | FileCheck %s --check-prefixes=ELF,ELF646# RUN: yaml2obj -DBITS=32 %s -o %t327# RUN: llvm-readobj --sections %t32 | FileCheck %s --check-prefixes=ELF,ELF328 9## Check flag aliases produce identical output.10# RUN: llvm-readobj --sections %t64 > %t64.llvm.sections11# RUN: llvm-readobj -S %t64 > %t64.llvm.upper.s12# RUN: cmp %t64.llvm.sections %t64.llvm.upper.s13# RUN: llvm-readobj --section-headers %t64 > %t64.llvm.section-headers14# RUN: cmp %t64.llvm.sections %t64.llvm.section-headers15 16# RUN: llvm-readobj --sections %t32 > %t32.llvm.sections17# RUN: llvm-readobj -S %t32 > %t32.llvm.upper.s18# RUN: cmp %t32.llvm.sections %t32.llvm.upper.s19# RUN: llvm-readobj --section-headers %t32 > %t32.llvm.section-headers20# RUN: cmp %t32.llvm.sections %t32.llvm.section-headers21 22# ELF:      Sections [23# ELF-NEXT:   Section {24# ELF-NEXT:     Index: 025# ELF-NEXT:     Name:  (0)26# ELF-NEXT:     Type: SHT_NULL (0x0)27# ELF-NEXT:     Flags [ (0x0)28# ELF-NEXT:     ]29# ELF-NEXT:     Address: 0x030# ELF-NEXT:     Offset: 0x031# ELF-NEXT:     Size: 032# ELF-NEXT:     Link: 033# ELF-NEXT:     Info: 034# ELF-NEXT:     AddressAlignment: 035# ELF-NEXT:     EntrySize: 036# ELF-NEXT:   }37# ELF-NEXT:   Section {38# ELF-NEXT:     Index: 139# ELF-NEXT:     Name: .foo (1)40# ELF-NEXT:     Type: SHT_PROGBITS (0x1)41# ELF-NEXT:     Flags [ (0x3)42# ELF-NEXT:       SHF_ALLOC (0x2)43# ELF-NEXT:       SHF_WRITE (0x1)44# ELF-NEXT:     ]45# ELF-NEXT:     Address: 0x246# ELF64-NEXT:   Offset: 0x4147# ELF32-NEXT:   Offset: 0x3748# ELF-NEXT:     Size: 349# ELF-NEXT:     Link: 450# ELF-NEXT:     Info: 151# ELF-NEXT:     AddressAlignment: 552# ELF-NEXT:     EntrySize: 653# ELF-NEXT:   }54# ELF-NEXT:   Section {55# ELF-NEXT:     Index: 256# ELF-NEXT:     Name: .strtab (16)57# ELF-NEXT:     Type: SHT_STRTAB (0x3)58# ELF-NEXT:     Flags [ (0x0)59# ELF-NEXT:     ]60# ELF-NEXT:     Address: 0x061# ELF64-NEXT:   Offset: 0x4462# ELF32-NEXT:   Offset: 0x3A63# ELF-NEXT:     Size: 164# ELF-NEXT:     Link: 065# ELF-NEXT:     Info: 066# ELF-NEXT:     AddressAlignment: 167# ELF-NEXT:     EntrySize: 068# ELF-NEXT:   }69# ELF-NEXT:   Section {70# ELF-NEXT:     Index: 371# ELF-NEXT:     Name: .shstrtab (6)72# ELF-NEXT:     Type: SHT_STRTAB (0x3)73# ELF-NEXT:     Flags [ (0x0)74# ELF-NEXT:     ]75# ELF-NEXT:     Address: 0x076# ELF64-NEXT:   Offset: 0x4577# ELF32-NEXT:   Offset: 0x3B78# ELF-NEXT:     Size: 2479# ELF-NEXT:     Link: 080# ELF-NEXT:     Info: 081# ELF-NEXT:     AddressAlignment: 182# ELF-NEXT:     EntrySize: 083# ELF-NEXT:   }84# ELF-NEXT: ]85 86--- !ELF87FileHeader:88  Class: ELFCLASS[[BITS=64]]89  Data:  ELFDATA2LSB90  Type:  ET_REL91Sections:92  - Name:         .foo93    Type:         SHT_PROGBITS94    Info:         195    Address:      0x296    Size:         0x397    Flags:        [ SHF_WRITE, SHF_ALLOC ]98    Link:         499    AddressAlign: 5100    EntSize:      6101