2013-07-24 23:56:06 +08:00
|
|
|
#ifndef BIOS_LINKER_LOADER_H
|
|
|
|
#define BIOS_LINKER_LOADER_H
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
2016-05-19 21:19:25 +08:00
|
|
|
typedef struct BIOSLinker {
|
|
|
|
GArray *cmd_blob;
|
2016-05-19 21:19:26 +08:00
|
|
|
GArray *file_list;
|
2016-05-19 21:19:25 +08:00
|
|
|
} BIOSLinker;
|
2013-07-24 23:56:06 +08:00
|
|
|
|
2016-05-19 21:19:25 +08:00
|
|
|
BIOSLinker *bios_linker_loader_init(void);
|
|
|
|
|
|
|
|
void bios_linker_loader_alloc(BIOSLinker *linker,
|
2016-05-19 21:19:26 +08:00
|
|
|
const char *file_name,
|
|
|
|
GArray *file_blob,
|
2013-07-24 23:56:06 +08:00
|
|
|
uint32_t alloc_align,
|
|
|
|
bool alloc_fseg);
|
|
|
|
|
2016-05-19 21:19:25 +08:00
|
|
|
void bios_linker_loader_add_checksum(BIOSLinker *linker, const char *file,
|
2013-07-24 23:56:06 +08:00
|
|
|
void *start, unsigned size,
|
|
|
|
uint8_t *checksum);
|
|
|
|
|
2016-05-19 21:19:25 +08:00
|
|
|
void bios_linker_loader_add_pointer(BIOSLinker *linker,
|
2013-07-24 23:56:06 +08:00
|
|
|
const char *dest_file,
|
|
|
|
const char *src_file,
|
2016-05-19 21:19:26 +08:00
|
|
|
void *pointer,
|
2013-07-24 23:56:06 +08:00
|
|
|
uint8_t pointer_size);
|
|
|
|
|
2016-05-19 21:19:25 +08:00
|
|
|
void *bios_linker_loader_cleanup(BIOSLinker *linker);
|
2013-07-24 23:56:06 +08:00
|
|
|
#endif
|