17 #define EMBED( _index, _path, _name ) \ 18 extern char embedded_image_ ## _index ## _data[]; \ 19 extern size_t ABS_SYMBOL ( embedded_image_ ## _index ## _len ); \ 20 __asm__ ( ".section \".data\", \"aw\", " PROGBITS "\n\t" \ 21 "\nembedded_image_" #_index "_data:\n\t" \ 22 ".incbin \"" _path "\"\n\t" \ 23 "\nembedded_image_" #_index "_end:\n\t" \ 24 ".equ embedded_image_" #_index "_len, " \ 25 "( embedded_image_" #_index "_end - " \ 26 " embedded_image_" #_index "_data )\n\t" \ 32 #define EMBED( _index, _path, _name ) { \ 33 .refcnt = REF_INIT ( free_image ), \ 35 .flags = ( IMAGE_STATIC | IMAGE_STATIC_NAME ), \ 36 .rwdata = embedded_image_ ## _index ## _data, \ 37 .len = ABS_VALUE_INIT ( embedded_image_ ## _index ## _len ), \ 60 DBG (
"Embedded image \"%s\": %zd bytes at %p\n",
63 DBG (
"Could not register embedded image \"%s\": " 72 DBG (
"Could not select embedded image \"%s\": %s\n",
struct arbelprm_rc_send_wqe rc
int image_select(struct image *image)
Select image for execution.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static void embedded_init(void)
Register all embedded images.
static struct image embedded_images[]
struct init_fn embedded_init_fn __init_fn(INIT_LATE)
Embedded image initialisation function.
An initialisation function.
int register_image(struct image *image)
Register executable image.
char * strerror(int errno)
Retrieve string representation of error number.
size_t len
Length of raw file image.
uint8_t data[48]
Additional event data.
#define INIT_LATE
Late initialisation.
static void image_trust(struct image *image)
Set image as trusted.
#define DBG(...)
Print a debugging message.