40 typedef u16_t cle_off;
41 typedef u16_t cle_word;
42 typedef u16_t cle_half;
46 typedef uint32_t cle_addr;
48 typedef uintptr_t cle_addr;
51 typedef char cle_scratch[32];
57 cle_off textrelaoff, datarelaoff;
58 cle_word textrelasize, datarelasize;
60 cle_off textoff, dataoff;
61 cle_word textsize, datasize, bsssize;
63 cle_off symtaboff, strtaboff;
66 unsigned char text_shndx;
67 unsigned char data_shndx;
68 unsigned char bss_shndx;
69 unsigned char unused_shndx;
75 cle_read_info(
struct cle_info *info,
76 int (*read)(
void *,
int, off_t),
80 cle_relocate(
struct cle_info *info,
81 int (*read)(
void *,
int, off_t),
88 cle_lookup(
struct cle_info *info,
89 int (*read)(
void *,
int, off_t),
95 int cle_write_reloc(
void *,
96 const struct elf32_rela *,
98 const struct cle_info *);
104 #define CLE_BAD_HEADER 1
105 #define CLE_NO_SYMTAB 2
106 #define CLE_NO_STRTAB 3
107 #define CLE_NO_TEXT 4
108 #define CLE_UNDEFINED 5
109 #define CLE_UNKNOWN_SEGMENT 6
110 #define CLE_NO_STARTPOINT 7
111 #define CLE_TEXT_TO_LARGE 8
112 #define CLE_DATA_TO_LARGE 9
113 #define CLE_UNKNOWN_RELOC 10
114 #define CLE_MULTIPLY_DEFINED 11