llvm-objdump: sort phdr type strings in advance of adding new ones

llvm-svn: 290494
This commit is contained in:
Ed Maste 2016-12-24 14:53:45 +00:00
parent 0cc3051d8e
commit 178a4e5f8d
1 changed files with 7 additions and 7 deletions

View File

@ -30,20 +30,20 @@ template <class ELFT> void printProgramHeaders(const ELFFile<ELFT> *o) {
errorToErrorCode(ProgramHeaderOrError.takeError()).message()); errorToErrorCode(ProgramHeaderOrError.takeError()).message());
for (const typename ELFO::Elf_Phdr &Phdr : *ProgramHeaderOrError) { for (const typename ELFO::Elf_Phdr &Phdr : *ProgramHeaderOrError) {
switch (Phdr.p_type) { switch (Phdr.p_type) {
case ELF::PT_LOAD: case ELF::PT_DYNAMIC:
outs() << " LOAD "; outs() << " DYNAMIC ";
break;
case ELF::PT_GNU_STACK:
outs() << " STACK ";
break; break;
case ELF::PT_GNU_EH_FRAME: case ELF::PT_GNU_EH_FRAME:
outs() << "EH_FRAME "; outs() << "EH_FRAME ";
break; break;
case ELF::PT_GNU_STACK:
outs() << " STACK ";
break;
case ELF::PT_INTERP: case ELF::PT_INTERP:
outs() << " INTERP "; outs() << " INTERP ";
break; break;
case ELF::PT_DYNAMIC: case ELF::PT_LOAD:
outs() << " DYNAMIC "; outs() << " LOAD ";
break; break;
case ELF::PT_PHDR: case ELF::PT_PHDR:
outs() << " PHDR "; outs() << " PHDR ";