1 # RUN: yaml2obj --docnum=1 %s -o %t
2 # RUN: llvm-readobj -l %t | FileCheck %s
13 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
14 AddressAlign: 0x0000000000001000
18 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
20 AddressAlign: 0x0000000000000010
25 AddressAlign: 0x0000000000001000
40 - Type: PT_GNU_EH_FRAME
44 #CHECK: ProgramHeaders [
45 #CHECK-NEXT: ProgramHeader {
46 #CHECK-NEXT: Type: PT_LOAD
47 #CHECK-NEXT: Offset: 0x1000
48 #CHECK-NEXT: VirtualAddress: 0xAAAA1000
49 #CHECK-NEXT: PhysicalAddress: 0xFFFF1000
50 #CHECK-NEXT: FileSize: 20
51 #CHECK-NEXT: MemSize: 20
56 #CHECK-NEXT: Alignment: 4096
58 #CHECK-NEXT: ProgramHeader {
59 #CHECK-NEXT: Type: PT_LOAD
60 #CHECK-NEXT: Offset: 0x2000
61 #CHECK-NEXT: VirtualAddress: 0xAAAA2000
62 #CHECK-NEXT: PhysicalAddress: 0xFFFF2000
63 #CHECK-NEXT: FileSize: 4
64 #CHECK-NEXT: MemSize: 4
68 #CHECK-NEXT: Alignment: 4096
70 #CHECK-NEXT: ProgramHeader {
71 #CHECK-NEXT: Type: PT_GNU_EH_FRAME (0x6474E550)
73 #CHECK-NEXT: ProgramHeader {
74 #CHECK-NEXT: Type: PT_GNU_STACK (0x6474E551)
76 #CHECK-NEXT: ProgramHeader {
77 #CHECK-NEXT: Type: PT_GNU_RELRO (0x6474E552)
81 ## Check we do not allow referencing sections that do not exist.
82 # RUN: not yaml2obj --docnum=2 %s -o %t 2>&1 | FileCheck %s --check-prefix=ERR
84 # ERR: error: unknown section referenced: '.foo' by program header
85 # ERR: error: unknown section referenced: '.bar' by program header