summaryrefslogtreecommitdiff
path: root/utils/rknanoutils/rkboottool/elf.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-10-31 16:09:28 +0100
committerSolomon Peachy <pizza@shaftnet.org>2024-10-27 09:12:31 -0400
commitb8d35c042de327a7ac5b35496283cdc2ab22d991 (patch)
tree120919cd0ac0372cc52a298e78920bc21c103e37 /utils/rknanoutils/rkboottool/elf.h
parentd22bb548b23c4281fc0fa0862333d912069752ae (diff)
downloadrockbox-b8d35c042de327a7ac5b35496283cdc2ab22d991.tar.gz
rockbox-b8d35c042de327a7ac5b35496283cdc2ab22d991.zip
rknanotools: fix rknano stages processing
Change-Id: Ia88f5aa2a6c56b312f80b31afab41d1dc68b871b
Diffstat (limited to 'utils/rknanoutils/rkboottool/elf.h')
-rw-r--r--utils/rknanoutils/rkboottool/elf.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/rknanoutils/rkboottool/elf.h b/utils/rknanoutils/rkboottool/elf.h
index 2166833276..2408e0c588 100644
--- a/utils/rknanoutils/rkboottool/elf.h
+++ b/utils/rknanoutils/rkboottool/elf.h
@@ -42,6 +42,7 @@ struct elf_section_t
42 uint32_t addr; /* virtual address */ 42 uint32_t addr; /* virtual address */
43 uint32_t size; /* virtual size */ 43 uint32_t size; /* virtual size */
44 enum elf_section_type_t type; 44 enum elf_section_type_t type;
45 char *name;
45 /* <union> */ 46 /* <union> */
46 void *section; /* data */ 47 void *section; /* data */
47 uint32_t pattern; /* fill pattern */ 48 uint32_t pattern; /* fill pattern */
@@ -49,6 +50,7 @@ struct elf_section_t
49 struct elf_section_t *next; 50 struct elf_section_t *next;
50 /* Internal to elf_write_file */ 51 /* Internal to elf_write_file */
51 uint32_t offset; 52 uint32_t offset;
53 uint32_t name_offset;
52}; 54};
53 55
54struct elf_segment_t 56struct elf_segment_t
@@ -68,6 +70,7 @@ struct elf_params_t
68 struct elf_section_t *last_section; 70 struct elf_section_t *last_section;
69 struct elf_segment_t *first_segment; 71 struct elf_segment_t *first_segment;
70 struct elf_segment_t *last_segment; 72 struct elf_segment_t *last_segment;
73 int unique_index;
71}; 74};
72 75
73typedef bool (*elf_read_fn_t)(void *user, uint32_t addr, void *buf, size_t count); 76typedef bool (*elf_read_fn_t)(void *user, uint32_t addr, void *buf, size_t count);
@@ -77,7 +80,7 @@ typedef void (*elf_printf_fn_t)(void *user, bool error, const char *fmt, ...);
77 80
78void elf_init(struct elf_params_t *params); 81void elf_init(struct elf_params_t *params);
79void elf_add_load_section(struct elf_params_t *params, 82void elf_add_load_section(struct elf_params_t *params,
80 uint32_t load_addr, uint32_t size, const void *section); 83 uint32_t load_addr, uint32_t size, const void *section, const char *name);
81void elf_add_fill_section(struct elf_params_t *params, 84void elf_add_fill_section(struct elf_params_t *params,
82 uint32_t fill_addr, uint32_t size, uint32_t pattern); 85 uint32_t fill_addr, uint32_t size, uint32_t pattern);
83uint32_t elf_translate_virtual_address(struct elf_params_t *params, uint32_t addr); 86uint32_t elf_translate_virtual_address(struct elf_params_t *params, uint32_t addr);