]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
readelf: add pretty printing for FDO Dlopen Metadata note
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 20 May 2024 15:47:00 +0000 (16:47 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 20 May 2024 15:47:00 +0000 (16:47 +0100)
binutils/readelf.c
include/elf/common.h

index bb3dde017e7649092a3db8dca0d5906335401478..e2203cff295919210e9ea03f5a50ddfabc61abe8 100644 (file)
@@ -20514,6 +20514,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
        return _("GO BUILDID");
       case FDO_PACKAGING_METADATA:
        return _("FDO_PACKAGING_METADATA");
+      case FDO_DLOPEN_METADATA:
+       return _("FDO_DLOPEN_METADATA");
       default:
        break;
       }
@@ -21773,6 +21775,11 @@ print_fdo_note (Elf_Internal_Note * pnote)
       printf (_("    Packaging Metadata: %.*s\n"), (int) pnote->descsz, pnote->descdata);
       return true;
     }
+  if (pnote->descsz > 0 && pnote->type == FDO_DLOPEN_METADATA)
+    {
+      printf (_("    Dlopen Metadata: %.*s\n"), (int) pnote->descsz, pnote->descdata);
+      return true;
+    }
   return false;
 }
 
index 832f9bd510fc7586cd065ce1f1d3dc178c7a4fab..7e62c34643c7ada3a8b2e451e0d8b5687c16cccb 100644 (file)
 /* Values for FDO .note.package notes as defined on https://systemd.io/COREDUMP_PACKAGE_METADATA/  */
 #define FDO_PACKAGING_METADATA 0xcafe1a7e
 
+/* Values for FDO .note.dlopen notes as defined on https://systemd.io/ELF_DLOPEN_METADATA/  */
+#define FDO_DLOPEN_METADATA 0x407c0c0a
+
 /* These three macros disassemble and assemble a symbol table st_info field,
    which contains the symbol binding and symbol type.  The STB_ and STT_
    defines identify the binding and type.  */