diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2015-05-15 15:59:22 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2015-05-15 15:59:22 +0000 |
| commit | eeb2fa98774159100263f927c2b44b674ffd9e96 (patch) | |
| tree | c0278c950d475f0dc58de7834e02f4323ce6f0ee | |
| parent | b80def51e15c0e7a12fb61b118f1c4ec2d3202c0 (diff) | |
| download | bcm5719-llvm-eeb2fa98774159100263f927c2b44b674ffd9e96.tar.gz bcm5719-llvm-eeb2fa98774159100263f927c2b44b674ffd9e96.zip | |
[llvm-readobj] Teach llvm-readobj to print PT_MIPS_ABIFLAGS program header
llvm-svn: 237451
| -rwxr-xr-x | llvm/test/Object/Inputs/program-headers.mips | bin | 648 -> 992 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-readobj/program-headers.test | 22 | ||||
| -rw-r--r-- | llvm/tools/llvm-readobj/ELFDumper.cpp | 1 |
3 files changed, 18 insertions, 5 deletions
diff --git a/llvm/test/Object/Inputs/program-headers.mips b/llvm/test/Object/Inputs/program-headers.mips Binary files differindex 54ebfea31f0..e3485b22374 100755 --- a/llvm/test/Object/Inputs/program-headers.mips +++ b/llvm/test/Object/Inputs/program-headers.mips diff --git a/llvm/test/tools/llvm-readobj/program-headers.test b/llvm/test/tools/llvm-readobj/program-headers.test index f014c039042..8e8855d8b8e 100644 --- a/llvm/test/tools/llvm-readobj/program-headers.test +++ b/llvm/test/tools/llvm-readobj/program-headers.test @@ -83,10 +83,22 @@ ELF-MIPS-NEXT: AddressSize: 32bit ELF-MIPS-NEXT: LoadName: ELF-MIPS-NEXT: ProgramHeaders [ ELF-MIPS-NEXT: ProgramHeader { +ELF-MIPS-NEXT: Type: PT_MIPS_ABIFLAGS (0x70000003) +ELF-MIPS-NEXT: Offset: 0x98 +ELF-MIPS-NEXT: VirtualAddress: 0x400098 +ELF-MIPS-NEXT: PhysicalAddress: 0x400098 +ELF-MIPS-NEXT: FileSize: 24 +ELF-MIPS-NEXT: MemSize: 24 +ELF-MIPS-NEXT: Flags [ (0x4) +ELF-MIPS-NEXT: PF_R (0x4) +ELF-MIPS-NEXT: ] +ELF-MIPS-NEXT: Alignment: 8 +ELF-MIPS-NEXT: } +ELF-MIPS-NEXT: ProgramHeader { ELF-MIPS-NEXT: Type: PT_MIPS_REGINFO (0x70000000) -ELF-MIPS-NEXT: Offset: 0x74 -ELF-MIPS-NEXT: VirtualAddress: 0x400074 -ELF-MIPS-NEXT: PhysicalAddress: 0x400074 +ELF-MIPS-NEXT: Offset: 0xB0 +ELF-MIPS-NEXT: VirtualAddress: 0x4000B0 +ELF-MIPS-NEXT: PhysicalAddress: 0x4000B0 ELF-MIPS-NEXT: FileSize: 24 ELF-MIPS-NEXT: MemSize: 24 ELF-MIPS-NEXT: Flags [ (0x4) @@ -99,8 +111,8 @@ ELF-MIPS-NEXT: Type: PT_LOAD (0x1) ELF-MIPS-NEXT: Offset: 0x0 ELF-MIPS-NEXT: VirtualAddress: 0x400000 ELF-MIPS-NEXT: PhysicalAddress: 0x400000 -ELF-MIPS-NEXT: FileSize: 160 -ELF-MIPS-NEXT: MemSize: 160 +ELF-MIPS-NEXT: FileSize: 224 +ELF-MIPS-NEXT: MemSize: 224 ELF-MIPS-NEXT: Flags [ (0x5) ELF-MIPS-NEXT: PF_R (0x4) ELF-MIPS-NEXT: PF_X (0x1) diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 0b1063fb86a..f096e7720d6 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -483,6 +483,7 @@ static const char *getElfSegmentType(unsigned Arch, unsigned Type) { LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_REGINFO); LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_RTPROC); LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_OPTIONS); + LLVM_READOBJ_ENUM_CASE(ELF, PT_MIPS_ABIFLAGS); } } |

