Recognize PT_OPENBSD_MUTABLE with LLVM's readobj / objdump.
authorderaadt <deraadt@openbsd.org>
Mon, 14 Nov 2022 13:42:19 +0000 (13:42 +0000)
committerderaadt <deraadt@openbsd.org>
Mon, 14 Nov 2022 13:42:19 +0000 (13:42 +0000)
from brad

gnu/llvm/llvm/tools/llvm-objdump/ELFDump.cpp
gnu/llvm/llvm/tools/llvm-readobj/ELFDumper.cpp

index da74158..8ceb941 100644 (file)
@@ -246,6 +246,9 @@ static void printProgramHeaders(const ELFFile<ELFT> &Obj, StringRef FileName) {
     case ELF::PT_OPENBSD_BOOTDATA:
       outs() << "    OPENBSD_BOOTDATA ";
       break;
+    case ELF::PT_OPENBSD_MUTABLE:
+      outs() << "    OPENBSD_MUTABLE ";
+      break;
     case ELF::PT_OPENBSD_RANDOMIZE:
       outs() << "    OPENBSD_RANDOMIZE ";
       break;
index f221acb..f0708a7 100644 (file)
@@ -1369,6 +1369,7 @@ static StringRef segmentTypeToString(unsigned Arch, unsigned Type) {
     LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_RELRO);
     LLVM_READOBJ_ENUM_CASE(ELF, PT_GNU_PROPERTY);
 
+    LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_MUTABLE);
     LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_RANDOMIZE);
     LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_WXNEEDED);
     LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_BOOTDATA);