Lines Matching +full:0 +full:x03ffffff

39 #define ARCH_SHF_SMALL 0
152 memset(addr, 0, len); in alloc_progmem()
192 {ARCH_SHF_SMALL | SHF_ALLOC, 0} in layout_sections()
196 for (i = 0; i < hdr->e_shnum; i++) in layout_sections()
197 sechdrs[i].sh_entsize = ~0UL; in layout_sections()
199 for (m = 0; m < ARRAY_SIZE(masks); ++m) { in layout_sections()
200 for (i = 0; i < hdr->e_shnum; ++i) { in layout_sections()
206 if ((s->sh_flags & masks[m][0]) != masks[m][0] in layout_sections()
208 || s->sh_entsize != ~0UL) in layout_sections()
230 return 0; in apply_r_mips_none()
238 if (!(*location & 0xffff)) { in apply_r_mips_gprel16()
244 (int)(short)(*location & 0xffff) - gp_addr); in apply_r_mips_gprel16()
248 pr_debug("VPE loader: apply_r_mips_gprel16: relative address 0x%x out of range of gp register\n", in apply_r_mips_gprel16()
253 *location = (*location & 0xffff0000) | (rel & 0xffff); in apply_r_mips_gprel16()
255 return 0; in apply_r_mips_gprel16()
267 pr_debug("VPE loader: apply_r_mips_pc16: relative address out of range 0x%x\n", in apply_r_mips_pc16()
272 *location = (*location & 0xffff0000) | (rel & 0xffff); in apply_r_mips_pc16()
274 return 0; in apply_r_mips_pc16()
282 return 0; in apply_r_mips_32()
297 * if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) { in apply_r_mips_26()
305 *location = (*location & ~0x03ffffff) | in apply_r_mips_26()
306 ((*location + (v >> 2)) & 0x03ffffff); in apply_r_mips_26()
307 return 0; in apply_r_mips_26()
329 return 0; in apply_r_mips_hi16()
340 vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; in apply_r_mips_lo16()
363 val = ((insn & 0xffff) << 16) + vallo; in apply_r_mips_lo16()
370 val = ((val >> 16) + ((val & 0x8000) != 0)) & 0xffff; in apply_r_mips_lo16()
372 insn = (insn & ~0xffff) | val; in apply_r_mips_lo16()
387 insnlo = (insnlo & ~0xffff) | (val & 0xffff); in apply_r_mips_lo16()
390 return 0; in apply_r_mips_lo16()
437 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocations()
458 pr_warn("VPE loader: .text+0x%x relocation type %s for symbol \"%s\" failed\n", in apply_relocations()
465 return 0; in apply_relocations()
471 gp_offs = gp_addr - (secbase & 0xffff0000); in save_gp_address()
483 unsigned long secbase, bssbase = 0; in simplify_symbols()
488 for (i = 0; i < nsecs; i++) { in simplify_symbols()
489 if (strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) == 0) { in simplify_symbols()
525 if (strncmp(strtab + sym[i].st_name, "_gp", 3) == 0) in simplify_symbols()
543 pr_debug(" i %d name <%s> 0x%x\n", i, strtab + sym[i].st_name, in dump_elfsymbols()
557 if (strcmp(strtab + sym[i].st_name, "__start") == 0) in find_vpe_symbols()
560 if (strcmp(strtab + sym[i].st_name, "vpe_shared") == 0) in find_vpe_symbols()
564 if ((v->__start == 0) || (v->shared_ptr == NULL)) in find_vpe_symbols()
567 return 0; in find_vpe_symbols()
579 long err = 0; in vpe_elfload()
581 unsigned int len, i, symindex = 0, strindex = 0, relocate = 0; in vpe_elfload()
584 memset(&mod, 0, sizeof(struct module)); in vpe_elfload()
592 if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0 in vpe_elfload()
613 sechdrs[0].sh_addr = 0; in vpe_elfload()
616 symindex = strindex = 0; in vpe_elfload()
650 for (i = 0; i < hdr->e_shnum; i++) { in vpe_elfload()
664 pr_debug(" section sh_name %s sh_addr 0x%x\n", in vpe_elfload()
692 if (err < 0) in vpe_elfload()
700 for (i = 0; i < hdr->e_phnum; i++) { in vpe_elfload()
706 0, phdr->p_memsz - phdr->p_filesz); in vpe_elfload()
711 for (i = 0; i < hdr->e_shnum; i++) { in vpe_elfload()
733 if ((find_vpe_symbols(v, sechdrs, symindex, strtab, &mod)) < 0) { in vpe_elfload()
734 if (v->__start == 0) { in vpe_elfload()
745 return 0; in vpe_elfload()
788 v->len = 0; in vpe_open()
790 v->__start = 0; in vpe_open()
792 return 0; in vpe_open()
800 int ret = 0; in vpe_release()
807 if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) == 0) { in vpe_release()
808 if (vpe_elfload(v) >= 0) { in vpe_release()
824 if (ret < 0) in vpe_release()
828 v->plen = 0; in vpe_release()
891 return 0; in vpe_notify()