+2022-03-16 Simon Marchi <simon.marchi@efficios.com>
+
+ * readelf.c (get_amdgpu_elf_note_type): New.
+ (process_note): Handle "AMDGPU" notes.
+
2022-03-16 Simon Marchi <simon.marchi@efficios.com>
* readelf.c: Include elf/amdgcn.h.
}
}
+static const char *
+get_amdgpu_elf_note_type (unsigned int e_type)
+{
+ switch (e_type)
+ {
+ case NT_AMDGPU_METADATA:
+ return _("NT_AMDGPU_METADATA (code object metadata)");
+ default:
+ {
+ static char buf[64];
+ snprintf (buf, sizeof (buf), _("Unknown note type: (0x%08x)"), e_type);
+ return buf;
+ }
+ }
+}
+
static void
decode_x86_isa (unsigned int bitmask)
{
/* GNU-specific object file notes. */
nt = get_gnu_elf_note_type (pnote->type);
+ else if (startswith (pnote->namedata, "AMDGPU"))
+ /* AMDGPU-specific object file notes. */
+ nt = get_amdgpu_elf_note_type (pnote->type);
+
else if (startswith (pnote->namedata, "FreeBSD"))
/* FreeBSD-specific core file notes. */
nt = get_freebsd_elfcore_note_type (filedata, pnote->type);
+2022-03-16 Simon Marchi <simon.marchi@efficios.com>
+
+ * elf/amdgcn.h (NT_AMDGPU_METADATA): New.
+
2022-03-16 Simon Marchi <simon.marchi@efficios.com>
* elf/amdgcn.h: Add EF_AMDGPU_MACH_AMDGCN_* and
#define EF_AMDGPU_FEATURE_SRAMECC_OFF_V4 0x800
#define EF_AMDGPU_FEATURE_SRAMECC_ON_V4 0xc00
+/* Notes. */
+
+#define NT_AMDGPU_METADATA 32
+
#endif /* _ELF_AMDGPU_H */