2013-07-24 19:56:06 +04:00
|
|
|
#ifndef BIOS_LINKER_LOADER_H
|
|
|
|
#define BIOS_LINKER_LOADER_H
|
|
|
|
|
|
|
|
|
2016-05-19 16:19:25 +03:00
|
|
|
typedef struct BIOSLinker {
|
|
|
|
GArray *cmd_blob;
|
2016-05-19 16:19:26 +03:00
|
|
|
GArray *file_list;
|
2016-05-19 16:19:25 +03:00
|
|
|
} BIOSLinker;
|
2013-07-24 19:56:06 +04:00
|
|
|
|
2016-05-19 16:19:25 +03:00
|
|
|
BIOSLinker *bios_linker_loader_init(void);
|
|
|
|
|
|
|
|
void bios_linker_loader_alloc(BIOSLinker *linker,
|
2016-05-19 16:19:26 +03:00
|
|
|
const char *file_name,
|
|
|
|
GArray *file_blob,
|
2013-07-24 19:56:06 +04:00
|
|
|
uint32_t alloc_align,
|
|
|
|
bool alloc_fseg);
|
|
|
|
|
2016-05-19 16:19:25 +03:00
|
|
|
void bios_linker_loader_add_checksum(BIOSLinker *linker, const char *file,
|
2016-05-19 16:19:30 +03:00
|
|
|
unsigned start_offset, unsigned size,
|
|
|
|
unsigned checksum_offset);
|
2013-07-24 19:56:06 +04:00
|
|
|
|
2016-05-19 16:19:25 +03:00
|
|
|
void bios_linker_loader_add_pointer(BIOSLinker *linker,
|
2013-07-24 19:56:06 +04:00
|
|
|
const char *dest_file,
|
2016-05-19 16:19:29 +03:00
|
|
|
uint32_t dst_patched_offset,
|
|
|
|
uint8_t dst_patched_size,
|
2013-07-24 19:56:06 +04:00
|
|
|
const char *src_file,
|
2016-05-19 16:19:29 +03:00
|
|
|
uint32_t src_offset);
|
2013-07-24 19:56:06 +04:00
|
|
|
|
2017-02-17 02:15:33 +03:00
|
|
|
void bios_linker_loader_write_pointer(BIOSLinker *linker,
|
|
|
|
const char *dest_file,
|
|
|
|
uint32_t dst_patched_offset,
|
|
|
|
uint8_t dst_patched_size,
|
|
|
|
const char *src_file,
|
|
|
|
uint32_t src_offset);
|
|
|
|
|
2016-05-19 16:19:27 +03:00
|
|
|
void bios_linker_loader_cleanup(BIOSLinker *linker);
|
2013-07-24 19:56:06 +04:00
|
|
|
#endif
|