Lines Matching refs:be32toh
150 be32toh(eh->e_shoff)));
160 sh = (Elf32_Shdr *)(image + be32toh(eh->e_shoff));
162 be32toh(sh[be16toh(eh->e_shstrndx)].sh_offset));
171 be32toh(sh[i].sh_name), shstrtab + be32toh(sh[i].sh_name),
172 be32toh(sh[i].sh_type), be32toh(sh[i].sh_flags),
173 be32toh(sh[i].sh_addr), be32toh(sh[i].sh_offset),
174 be32toh(sh[i].sh_size), be32toh(sh[i].sh_addralign)));
175 sh_size = (be32toh(sh[i].sh_size) +
176 be32toh(sh[i].sh_addralign) - 1) &
177 (- be32toh(sh[i].sh_addralign));
182 if (be32toh(sh[i].sh_flags) & SHF_ALLOC) {
183 if (be32toh(sh[i].sh_type) == SHT_PROGBITS) {
184 if (be32toh(sh[i].sh_flags) & SHF_WRITE)
191 } else if (be32toh(sh[i].sh_type) == SHT_RELA) {
192 trsz += be32toh(sh[i].sh_size);
196 else if (be32toh(sh[i].sh_type) == SHT_SYMTAB) {
198 be32toh(sh[i].sh_offset));
200 be32toh(sh[i].sh_name)) == 0) {
201 strtab = image + be32toh(sh[i].sh_offset);
256 if (be32toh(sh[i].sh_flags) & SHF_ALLOC) {
258 l, be32toh(sh[i].sh_size), be32toh(sh[i].sh_offset),
259 shstrtab + be32toh(sh[i].sh_name)));
260 if (be32toh(sh[i].sh_type) == SHT_PROGBITS)
262 image + be32toh(sh[i].sh_offset),
263 be32toh(sh[i].sh_size));
265 l += (be32toh(sh[i].sh_size) +
266 be32toh(sh[i].sh_addralign) - 1) &
267 (- be32toh(sh[i].sh_addralign));
276 relver = be32toh(*(uint32_t *)(buffer + 4));
313 if (be32toh(sh[i].sh_type) != SHT_RELA)
316 if (strncmp(shstrtab + be32toh(sh[i].sh_name), ".rela", 5) != 0)
318 shstrtab + be32toh(sh[i].sh_name));
320 if (strcmp(shstrtab + be32toh(sh[i].sh_name) + 5,
321 shstrtab + be32toh(sh[n].sh_name)) != 0)
328 shstrtab + be32toh(sh[i].sh_name));
329 ra = (Elf32_Rela *)(image + be32toh(sh[i].sh_offset));
330 for (n = 0; n < be32toh(sh[i].sh_size);
335 s = &symtab[ELF32_R_SYM(be32toh(ra->r_info))];
338 strtab + be32toh(s->st_name));
341 value = be32toh(ra->r_addend) + eval(s, sect_offset);
343 be32toh(ra->r_offset), be32toh(ra->r_info),
344 ELF32_R_TYPE(be32toh(ra->r_info)),
345 ELF32_R_SYM(be32toh(ra->r_info)),
346 be32toh(ra->r_addend), value));
347 switch (ELF32_R_TYPE(be32toh(ra->r_info))) {
350 memcpy(base + be32toh(ra->r_offset), &tmp32,
353 be32toh(ra->r_offset);
357 tmp32 = htobe32(value - be32toh(ra->r_offset));
358 memcpy(base + be32toh(ra->r_offset), &tmp32,
363 value -= be32toh(ra->r_offset);
368 memcpy(base + be32toh(ra->r_offset), &tmp16,
373 ELF32_R_TYPE(be32toh(ra->r_info)));
484 value = be32toh(s->st_value);