17#define GP_ELF_NOTE_VENDOR "gfxprim"
32 char name[
sizeof(GP_ELF_NOTE_VENDOR)];
74#define GP_ELF_NOTE(note_namespace, note_type, note_c_type, note_c_type_size, ...) \
75 __attribute__((used, section(".note." GP_ELF_NOTE_VENDOR "." note_namespace), aligned(4))) \
76 static const struct { \
77 const struct gp_elf_note_hdr hdr; \
79 } GP_UNIQUE_ID(gp_elf_note_) = { \
81 .namesz = sizeof(GP_ELF_NOTE_VENDOR), \
82 .descsz = note_c_type_size, \
84 .name = GP_ELF_NOTE_VENDOR, \
86 .desc = __VA_ARGS__, \
104#define GP_ELF_NOTE_STR(note_namespace, note_type, note_str) \
105 GP_ELF_NOTE(note_namespace, note_type, char desc[sizeof(note_str)], sizeof(note_str), note_str)
void gp_elf_notes_process(void(*callback)(uint32_t note_type, const void *note_desc, void *priv), void *priv)
Runs a callback on each gfxprim ELF note.
ELF note header as defined in ELF ABI.
uint32_t type
4 bytes of note type.
uint32_t descsz
4 bytes of note description size.
char desc_data[]
A descsz bytes of payload data.
uint32_t namesz
4 bytes of note name size.
char name[sizeof("gfxprim")]
A namesz long null terminated string of the entry owner, i.e. "gfxprim".