![]() |
GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
An ELF note implementation. More...
Go to the source code of this file.
Data Structures | |
| struct | gp_elf_note_hdr |
| ELF note header as defined in ELF ABI. More... | |
Macros | |
| #define | GP_ELF_NOTE(note_namespace, note_type, note_c_type, note_c_type_size, ...) |
| Declares a gfxprim ELF note. | |
| #define | GP_ELF_NOTE_STR(note_namespace, note_type, note_str) |
| Declares a gfxprim string note. | |
Functions | |
| 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. | |
An ELF note implementation.
Definition in file gp_elf_note.h.
| #define GP_ELF_NOTE | ( | note_namespace, | |
| note_type, | |||
| note_c_type, | |||
| note_c_type_size, | |||
| ... ) |
Declares a gfxprim ELF note.
This macro is supposed to be used as:
| note_namespace | A subsection to store the note to. The section is constructed as ".note.vendor.namespace". The namespace is stored in ELF headers however it's not accessible to the program at runtime. |
| note_type | This is usually an enum of all note types defined by the vendor and identifies what is stored in the note payload. |
| note_c_type | A C type that is used to store the payload to. |
| note_c_type_size | A C type size, usually sizeof(note_c_type), but can be larger in the case of a flexible array. |
| ... | An initializer for note_c_type, e.g. {.foo = bar, ...}. |
Definition at line 74 of file gp_elf_note.h.
| #define GP_ELF_NOTE_STR | ( | note_namespace, | |
| note_type, | |||
| note_str ) |
Declares a gfxprim string note.
This is a simplified interface for the GP_ELF_NOTE().
| note_namespace | A subsection to store the note to. The section is constructed as ".note.vendor.namespace". The namespace is stored in ELF headers however it's not accessible to the program at runtime. |
| note_type | This is usually an enum of all note types defined by the vendor and identifies what is stored in the note payload. |
| note_str | A string that is stored in the note, i.e. the note payload. |
Definition at line 104 of file gp_elf_note.h.
| 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.
This function is build on a top of a dl_iterate_phdr() and filters out everything that does not have vendor set to 'gfxprim'.
@callback A callback to be called for each note. @priv A priv pointer to be passed to the callback.