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