1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[yaml2obj][test] - Ensure that dynamic section has sh_entsize correctly set.

This updates the existent test because it lacks coverage.

Differential revision: https://reviews.llvm.org/D76226
This commit is contained in:
Georgii Rymar 2020-03-16 15:12:33 +03:00
parent d3c0c7544a
commit c352f2e253

View File

@ -1,18 +1,29 @@
## Ensures that dynamic section has sh_entsize correctly set. ## Ensures that dynamic section has sh_entsize correctly set.
# RUN: yaml2obj %s -o %t # RUN: yaml2obj -DBITS=64 %s -o %t.64
# RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix=SECTION # RUN: llvm-readobj --sections %t.64 | FileCheck %s -DENTSIZE=16
# RUN: yaml2obj -DBITS=32 %s -o %t.32
# RUN: llvm-readobj --sections %t.32 | FileCheck %s -DENTSIZE=8
!ELF !ELF
FileHeader: FileHeader:
Class: ELFCLASS64 Class: ELFCLASS[[BITS]]
Data: ELFDATA2LSB Data: ELFDATA2LSB
Type: ET_DYN Type: ET_DYN
Machine: EM_X86_64 Machine: EM_X86_64
Sections: Sections:
- Name: .dynamic ## Test default values set by yaml2obj.
Type: SHT_DYNAMIC - Name: .dynamic
Type: SHT_DYNAMIC
Flags: [ SHF_ALLOC, SHF_WRITE ] Flags: [ SHF_ALLOC, SHF_WRITE ]
## Test we can use an arbitrary value for sh_entsize.
- Name: .mydynamic
Type: SHT_DYNAMIC
EntSize: 0xFE
# SECTION: Name: .dynamic # CHECK: Name: .dynamic
# SECTION: EntrySize: 16 # CHECK: EntrySize:
# CHECK-SAME: {{^}} [[ENTSIZE]]{{$}}
# CHECK: Name: .mydynamic
# CHECK: EntrySize:
# CHECK-SAME: {{^}} 254{{$}}