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