summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/elf.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/sbtools/elf.h')
-rw-r--r--utils/imxtools/sbtools/elf.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/imxtools/sbtools/elf.h b/utils/imxtools/sbtools/elf.h
index 4200850e74..bc2971c4f1 100644
--- a/utils/imxtools/sbtools/elf.h
+++ b/utils/imxtools/sbtools/elf.h
@@ -27,6 +27,7 @@
27#include <stdbool.h> 27#include <stdbool.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <unistd.h> 29#include <unistd.h>
30#include "misc.h"
30 31
31/** 32/**
32 * API 33 * API
@@ -93,7 +94,6 @@ struct elf_params_t
93typedef bool (*elf_read_fn_t)(void *user, uint32_t addr, void *buf, size_t count); 94typedef bool (*elf_read_fn_t)(void *user, uint32_t addr, void *buf, size_t count);
94/* write function manages it's own error state */ 95/* write function manages it's own error state */
95typedef void (*elf_write_fn_t)(void *user, uint32_t addr, const void *buf, size_t count); 96typedef void (*elf_write_fn_t)(void *user, uint32_t addr, const void *buf, size_t count);
96typedef void (*elf_printf_fn_t)(void *user, bool error, const char *fmt, ...);
97 97
98void elf_init(struct elf_params_t *params); 98void elf_init(struct elf_params_t *params);
99void elf_add_load_section(struct elf_params_t *params, 99void elf_add_load_section(struct elf_params_t *params,
@@ -103,9 +103,8 @@ void elf_add_fill_section(struct elf_params_t *params,
103uint32_t elf_translate_virtual_address(struct elf_params_t *params, uint32_t addr); 103uint32_t elf_translate_virtual_address(struct elf_params_t *params, uint32_t addr);
104void elf_simplify(struct elf_params_t *params); 104void elf_simplify(struct elf_params_t *params);
105void elf_sort_by_address(struct elf_params_t *params); 105void elf_sort_by_address(struct elf_params_t *params);
106void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, elf_printf_fn_t printf, void *user); 106void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, generic_printf_t printf, void *user);
107bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, elf_printf_fn_t printf, 107bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, generic_printf_t printf, void *user);
108 void *user);
109bool elf_is_empty(struct elf_params_t *params); 108bool elf_is_empty(struct elf_params_t *params);
110void elf_set_start_addr(struct elf_params_t *params, uint32_t addr); 109void elf_set_start_addr(struct elf_params_t *params, uint32_t addr);
111bool elf_get_start_addr(struct elf_params_t *params, uint32_t *addr); 110bool elf_get_start_addr(struct elf_params_t *params, uint32_t *addr);
@@ -116,7 +115,6 @@ bool elf_guess(elf_read_fn_t read, void *user);
116 115
117/* standard implementation of read/write/printf functions 116/* standard implementation of read/write/printf functions
118 * with user being a FILE* pointer */ 117 * with user being a FILE* pointer */
119void elf_std_printf(void *user, bool error, const char *fmt, ...);
120void elf_std_write(void *user, uint32_t addr, const void *buf, size_t count); 118void elf_std_write(void *user, uint32_t addr, const void *buf, size_t count);
121bool elf_std_read(void *user, uint32_t addr, void *buf, size_t count); 119bool elf_std_read(void *user, uint32_t addr, void *buf, size_t count);
122 120