brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · d405eb1 Raw
53 lines · yaml
1## Test the p_align field of a program header can be set explicitly or inferred2## from the maximum alignment of contained sections.3 4## Explicit Align has priority over section alignments.5 6# RUN: yaml2obj --docnum=1 %s -o %t7# RUN: llvm-readobj -l %t | FileCheck %s8# CHECK:      ProgramHeader {9# CHECK-NOT:  ProgramHeader {10# CHECK:        Alignment: 1611# CHECK-NEXT: }12 13--- !ELF14FileHeader:15  Class: ELFCLASS6416  Data:  ELFDATA2LSB17  Type:  ET_EXEC18Sections:19  - Name:         .tdata20    Type:         SHT_PROGBITS21    AddressAlign: 422  - Name:         .tbss23    Type:         SHT_NOBITS24    AddressAlign: 6425ProgramHeaders:26  - Type:  PT_TLS27    Align: 1628    FirstSec: .tdata29    LastSec:  .tbss30 31## If Align is not specified, p_align is inferred from the maximum alignment32## of contained sections.33 34# RUN: yaml2obj --docnum=2 %s -o %t35# RUN: llvm-readobj -l %t | FileCheck %s36 37--- !ELF38FileHeader:39  Class: ELFCLASS6440  Data:  ELFDATA2LSB41  Type:  ET_EXEC42Sections:43  - Name:         .text44    Type:         SHT_PROGBITS45    AddressAlign: 446  - Name:         .text.hot47    Type:         SHT_PROGBITS48    AddressAlign: 1649ProgramHeaders:50  - Type:     PT_LOAD51    FirstSec: .text52    LastSec:  .text.hot53