diff options
author | Nico Rieck <nico.rieck@gmail.com> | 2013-04-12 04:07:39 +0000 |
---|---|---|
committer | Nico Rieck <nico.rieck@gmail.com> | 2013-04-12 04:07:39 +0000 |
commit | cf3b55ab18b6d0f5b658e746b57ec3cf193d5688 (patch) | |
tree | 26eb0b2d937072d5b091fe111ecde2ddb3d1a468 /test/tools/llvm-readobj | |
parent | 7e87373e91afe6a9ed1ead63d9d02448f02213d3 (diff) | |
download | external_llvm-cf3b55ab18b6d0f5b658e746b57ec3cf193d5688.zip external_llvm-cf3b55ab18b6d0f5b658e746b57ec3cf193d5688.tar.gz external_llvm-cf3b55ab18b6d0f5b658e746b57ec3cf193d5688.tar.bz2 |
Teach llvm-readobj to print ELF program headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tools/llvm-readobj')
-rw-r--r-- | test/tools/llvm-readobj/program-headers.test | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/test/tools/llvm-readobj/program-headers.test b/test/tools/llvm-readobj/program-headers.test new file mode 100644 index 0000000..2a574bb --- /dev/null +++ b/test/tools/llvm-readobj/program-headers.test @@ -0,0 +1,74 @@ +RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.elf-i386 \ +RUN: | FileCheck %s -check-prefix ELF-I386 +RUN: llvm-readobj -program-headers %p/../../Object/Inputs/program-headers.elf-x86-64 \ +RUN: | FileCheck %s -check-prefix ELF-X86-64 + +ELF-I386: ProgramHeaders [ +ELF-I386-NEXT: ProgramHeader { +ELF-I386-NEXT: Type: PT_LOAD (0x1) +ELF-I386-NEXT: Offset: 0x0 +ELF-I386-NEXT: VirtualAddress: 0x8048000 +ELF-I386-NEXT: PhysicalAddress: 0x8048000 +ELF-I386-NEXT: FileSize: 308 +ELF-I386-NEXT: MemSize: 308 +ELF-I386-NEXT: Flags [ (0x5) +ELF-I386-NEXT: PF_R (0x4) +ELF-I386-NEXT: PF_X (0x1) +ELF-I386-NEXT: ] +ELF-I386-NEXT: Alignment: 4096 +ELF-I386-NEXT: } +ELF-I386-NEXT: ProgramHeader { +ELF-I386-NEXT: Type: PT_GNU_STACK (0x6474E551) +ELF-I386-NEXT: Offset: 0x0 +ELF-I386-NEXT: VirtualAddress: 0x0 +ELF-I386-NEXT: PhysicalAddress: 0x0 +ELF-I386-NEXT: FileSize: 0 +ELF-I386-NEXT: MemSize: 0 +ELF-I386-NEXT: Flags [ (0x6) +ELF-I386-NEXT: PF_R (0x4) +ELF-I386-NEXT: PF_W (0x2) +ELF-I386-NEXT: ] +ELF-I386-NEXT: Alignment: 4 +ELF-I386-NEXT: } +ELF-I386-NEXT: ] + +ELF-X86-64: ProgramHeaders [ +ELF-X86-64-NEXT: ProgramHeader { +ELF-X86-64-NEXT: Type: PT_LOAD (0x1) +ELF-X86-64-NEXT: Offset: 0x0 +ELF-X86-64-NEXT: VirtualAddress: 0x400000 +ELF-X86-64-NEXT: PhysicalAddress: 0x400000 +ELF-X86-64-NEXT: FileSize: 312 +ELF-X86-64-NEXT: MemSize: 312 +ELF-X86-64-NEXT: Flags [ (0x5) +ELF-X86-64-NEXT: PF_R (0x4) +ELF-X86-64-NEXT: PF_X (0x1) +ELF-X86-64-NEXT: ] +ELF-X86-64-NEXT: Alignment: 2097152 +ELF-X86-64-NEXT: } +ELF-X86-64-NEXT: ProgramHeader { +ELF-X86-64-NEXT: Type: PT_GNU_EH_FRAME (0x6474E550) +ELF-X86-64-NEXT: Offset: 0xF4 +ELF-X86-64-NEXT: VirtualAddress: 0x4000F4 +ELF-X86-64-NEXT: PhysicalAddress: 0x4000F4 +ELF-X86-64-NEXT: FileSize: 20 +ELF-X86-64-NEXT: MemSize: 20 +ELF-X86-64-NEXT: Flags [ (0x4) +ELF-X86-64-NEXT: PF_R (0x4) +ELF-X86-64-NEXT: ] +ELF-X86-64-NEXT: Alignment: 4 +ELF-X86-64-NEXT: } +ELF-X86-64-NEXT: ProgramHeader { +ELF-X86-64-NEXT: Type: PT_GNU_STACK (0x6474E551) +ELF-X86-64-NEXT: Offset: 0x0 +ELF-X86-64-NEXT: VirtualAddress: 0x0 +ELF-X86-64-NEXT: PhysicalAddress: 0x0 +ELF-X86-64-NEXT: FileSize: 0 +ELF-X86-64-NEXT: MemSize: 0 +ELF-X86-64-NEXT: Flags [ (0x6) +ELF-X86-64-NEXT: PF_R (0x4) +ELF-X86-64-NEXT: PF_W (0x2) +ELF-X86-64-NEXT: ] +ELF-X86-64-NEXT: Alignment: 8 +ELF-X86-64-NEXT: } +ELF-X86-64-NEXT: ] |