1 RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.elf-i386 \ 2 RUN: | FileCheck %s -check-prefix ELF-I386 3 RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.elf-x86-64 \ 4 RUN: | FileCheck %s -check-prefix ELF-X86-64 5 RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.mips \ 6 RUN: | FileCheck %s -check-prefix ELF-MIPS 7 RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.mips64 \ 8 RUN: | FileCheck %s -check-prefix ELF-MIPS64 9 10 ELF-I386: ProgramHeaders [ 11 ELF-I386-NEXT: ProgramHeader { 12 ELF-I386-NEXT: Type: PT_LOAD (0x1) 13 ELF-I386-NEXT: Offset: 0x0 14 ELF-I386-NEXT: VirtualAddress: 0x8048000 15 ELF-I386-NEXT: PhysicalAddress: 0x8048000 16 ELF-I386-NEXT: FileSize: 308 17 ELF-I386-NEXT: MemSize: 308 18 ELF-I386-NEXT: Flags [ (0x5) 19 ELF-I386-NEXT: PF_R (0x4) 20 ELF-I386-NEXT: PF_X (0x1) 21 ELF-I386-NEXT: ] 22 ELF-I386-NEXT: Alignment: 4096 23 ELF-I386-NEXT: } 24 ELF-I386-NEXT: ProgramHeader { 25 ELF-I386-NEXT: Type: PT_GNU_STACK (0x6474E551) 26 ELF-I386-NEXT: Offset: 0x0 27 ELF-I386-NEXT: VirtualAddress: 0x0 28 ELF-I386-NEXT: PhysicalAddress: 0x0 29 ELF-I386-NEXT: FileSize: 0 30 ELF-I386-NEXT: MemSize: 0 31 ELF-I386-NEXT: Flags [ (0x6) 32 ELF-I386-NEXT: PF_R (0x4) 33 ELF-I386-NEXT: PF_W (0x2) 34 ELF-I386-NEXT: ] 35 ELF-I386-NEXT: Alignment: 4 36 ELF-I386-NEXT: } 37 ELF-I386-NEXT: ] 38 39 ELF-X86-64: ProgramHeaders [ 40 ELF-X86-64-NEXT: ProgramHeader { 41 ELF-X86-64-NEXT: Type: PT_LOAD (0x1) 42 ELF-X86-64-NEXT: Offset: 0x0 43 ELF-X86-64-NEXT: VirtualAddress: 0x400000 44 ELF-X86-64-NEXT: PhysicalAddress: 0x400000 45 ELF-X86-64-NEXT: FileSize: 312 46 ELF-X86-64-NEXT: MemSize: 312 47 ELF-X86-64-NEXT: Flags [ (0x5) 48 ELF-X86-64-NEXT: PF_R (0x4) 49 ELF-X86-64-NEXT: PF_X (0x1) 50 ELF-X86-64-NEXT: ] 51 ELF-X86-64-NEXT: Alignment: 2097152 52 ELF-X86-64-NEXT: } 53 ELF-X86-64-NEXT: ProgramHeader { 54 ELF-X86-64-NEXT: Type: PT_GNU_EH_FRAME (0x6474E550) 55 ELF-X86-64-NEXT: Offset: 0xF4 56 ELF-X86-64-NEXT: VirtualAddress: 0x4000F4 57 ELF-X86-64-NEXT: PhysicalAddress: 0x4000F4 58 ELF-X86-64-NEXT: FileSize: 20 59 ELF-X86-64-NEXT: MemSize: 20 60 ELF-X86-64-NEXT: Flags [ (0x4) 61 ELF-X86-64-NEXT: PF_R (0x4) 62 ELF-X86-64-NEXT: ] 63 ELF-X86-64-NEXT: Alignment: 4 64 ELF-X86-64-NEXT: } 65 ELF-X86-64-NEXT: ProgramHeader { 66 ELF-X86-64-NEXT: Type: PT_GNU_STACK (0x6474E551) 67 ELF-X86-64-NEXT: Offset: 0x0 68 ELF-X86-64-NEXT: VirtualAddress: 0x0 69 ELF-X86-64-NEXT: PhysicalAddress: 0x0 70 ELF-X86-64-NEXT: FileSize: 0 71 ELF-X86-64-NEXT: MemSize: 0 72 ELF-X86-64-NEXT: Flags [ (0x6) 73 ELF-X86-64-NEXT: PF_R (0x4) 74 ELF-X86-64-NEXT: PF_W (0x2) 75 ELF-X86-64-NEXT: ] 76 ELF-X86-64-NEXT: Alignment: 8 77 ELF-X86-64-NEXT: } 78 ELF-X86-64-NEXT: ] 79 80 ELF-MIPS: Format: ELF32-mips 81 ELF-MIPS-NEXT: Arch: mips 82 ELF-MIPS-NEXT: AddressSize: 32bit 83 ELF-MIPS-NEXT: LoadName: 84 ELF-MIPS-NEXT: ProgramHeaders [ 85 ELF-MIPS-NEXT: ProgramHeader { 86 ELF-MIPS-NEXT: Type: PT_MIPS_ABIFLAGS (0x70000003) 87 ELF-MIPS-NEXT: Offset: 0x98 88 ELF-MIPS-NEXT: VirtualAddress: 0x400098 89 ELF-MIPS-NEXT: PhysicalAddress: 0x400098 90 ELF-MIPS-NEXT: FileSize: 24 91 ELF-MIPS-NEXT: MemSize: 24 92 ELF-MIPS-NEXT: Flags [ (0x4) 93 ELF-MIPS-NEXT: PF_R (0x4) 94 ELF-MIPS-NEXT: ] 95 ELF-MIPS-NEXT: Alignment: 8 96 ELF-MIPS-NEXT: } 97 ELF-MIPS-NEXT: ProgramHeader { 98 ELF-MIPS-NEXT: Type: PT_MIPS_REGINFO (0x70000000) 99 ELF-MIPS-NEXT: Offset: 0xB0 100 ELF-MIPS-NEXT: VirtualAddress: 0x4000B0 101 ELF-MIPS-NEXT: PhysicalAddress: 0x4000B0 102 ELF-MIPS-NEXT: FileSize: 24 103 ELF-MIPS-NEXT: MemSize: 24 104 ELF-MIPS-NEXT: Flags [ (0x4) 105 ELF-MIPS-NEXT: PF_R (0x4) 106 ELF-MIPS-NEXT: ] 107 ELF-MIPS-NEXT: Alignment: 4 108 ELF-MIPS-NEXT: } 109 ELF-MIPS-NEXT: ProgramHeader { 110 ELF-MIPS-NEXT: Type: PT_LOAD (0x1) 111 ELF-MIPS-NEXT: Offset: 0x0 112 ELF-MIPS-NEXT: VirtualAddress: 0x400000 113 ELF-MIPS-NEXT: PhysicalAddress: 0x400000 114 ELF-MIPS-NEXT: FileSize: 224 115 ELF-MIPS-NEXT: MemSize: 224 116 ELF-MIPS-NEXT: Flags [ (0x5) 117 ELF-MIPS-NEXT: PF_R (0x4) 118 ELF-MIPS-NEXT: PF_X (0x1) 119 ELF-MIPS-NEXT: ] 120 ELF-MIPS-NEXT: Alignment: 65536 121 ELF-MIPS-NEXT: } 122 ELF-MIPS-NEXT: ] 123 124 ELF-MIPS64: Format: ELF64-mips 125 ELF-MIPS64-NEXT: Arch: mips64 126 ELF-MIPS64-NEXT: AddressSize: 64bit 127 ELF-MIPS64-NEXT: LoadName: 128 ELF-MIPS64-NEXT: ProgramHeaders [ 129 ELF-MIPS64-NEXT: ProgramHeader { 130 ELF-MIPS64-NEXT: Type: PT_LOAD (0x1) 131 ELF-MIPS64-NEXT: Offset: 0x0 132 ELF-MIPS64-NEXT: VirtualAddress: 0x120000000 133 ELF-MIPS64-NEXT: PhysicalAddress: 0x120000000 134 ELF-MIPS64-NEXT: FileSize: 136 135 ELF-MIPS64-NEXT: MemSize: 136 136 ELF-MIPS64-NEXT: Flags [ (0x5) 137 ELF-MIPS64-NEXT: PF_R (0x4) 138 ELF-MIPS64-NEXT: PF_X (0x1) 139 ELF-MIPS64-NEXT: ] 140 ELF-MIPS64-NEXT: Alignment: 65536 141 ELF-MIPS64-NEXT: } 142 ELF-MIPS64-NEXT: ] 143