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()
203 if ((s->sh_flags & masks[m][0]) != masks[m][0] in layout_sections()
205 || s->sh_entsize != ~0UL) in layout_sections()
211 if (m == 0) in layout_sections()
231 return 0; in apply_r_mips_none()
239 if (!(*location & 0xffff)) { in apply_r_mips_gprel16()
245 (int)(short)(*location & 0xffff) - gp_addr); in apply_r_mips_gprel16()
249 pr_debug("VPE loader: apply_r_mips_gprel16: relative address 0x%x out of range of gp register\n", in apply_r_mips_gprel16()
254 *location = (*location & 0xffff0000) | (rel & 0xffff); in apply_r_mips_gprel16()
256 return 0; in apply_r_mips_gprel16()
268 pr_debug("VPE loader: apply_r_mips_pc16: relative address out of range 0x%x\n", in apply_r_mips_pc16()
273 *location = (*location & 0xffff0000) | (rel & 0xffff); in apply_r_mips_pc16()
275 return 0; in apply_r_mips_pc16()
283 return 0; in apply_r_mips_32()
298 * if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) { in apply_r_mips_26()
306 *location = (*location & ~0x03ffffff) | in apply_r_mips_26()
307 ((*location + (v >> 2)) & 0x03ffffff); in apply_r_mips_26()
308 return 0; in apply_r_mips_26()
330 return 0; in apply_r_mips_hi16()
341 vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000; in apply_r_mips_lo16()
364 val = ((insn & 0xffff) << 16) + vallo; in apply_r_mips_lo16()
371 val = ((val >> 16) + ((val & 0x8000) != 0)) & 0xffff; in apply_r_mips_lo16()
373 insn = (insn & ~0xffff) | val; in apply_r_mips_lo16()
388 insnlo = (insnlo & ~0xffff) | (val & 0xffff); in apply_r_mips_lo16()
391 return 0; in apply_r_mips_lo16()
438 for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { in apply_relocations()
459 pr_warn("VPE loader: .text+0x%x relocation type %s for symbol \"%s\" failed\n", in apply_relocations()
466 return 0; in apply_relocations()
472 gp_offs = gp_addr - (secbase & 0xffff0000); in save_gp_address()
484 unsigned long secbase, bssbase = 0; in simplify_symbols()
489 for (i = 0; i < nsecs; i++) { in simplify_symbols()
490 if (strncmp(secstrings + sechdrs[i].sh_name, ".bss", 4) == 0) { in simplify_symbols()
526 if (strncmp(strtab + sym[i].st_name, "_gp", 3) == 0) in simplify_symbols()
544 pr_debug(" i %d name <%s> 0x%x\n", i, strtab + sym[i].st_name, in dump_elfsymbols()
558 if (strcmp(strtab + sym[i].st_name, "__start") == 0) in find_vpe_symbols()
561 if (strcmp(strtab + sym[i].st_name, "vpe_shared") == 0) in find_vpe_symbols()
565 if ((v->__start == 0) || (v->shared_ptr == NULL)) in find_vpe_symbols()
568 return 0; in find_vpe_symbols()
580 long err = 0; in vpe_elfload()
582 unsigned int len, i, symindex = 0, strindex = 0, relocate = 0; in vpe_elfload()
585 memset(&mod, 0, sizeof(struct module)); in vpe_elfload()
593 if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0 in vpe_elfload()
614 sechdrs[0].sh_addr = 0; in vpe_elfload()
617 symindex = strindex = 0; in vpe_elfload()
651 for (i = 0; i < hdr->e_shnum; i++) { in vpe_elfload()
665 pr_debug(" section sh_name %s sh_addr 0x%x\n", in vpe_elfload()
693 if (err < 0) in vpe_elfload()
701 for (i = 0; i < hdr->e_phnum; i++) { in vpe_elfload()
707 0, phdr->p_memsz - phdr->p_filesz); in vpe_elfload()
712 for (i = 0; i < hdr->e_shnum; i++) { in vpe_elfload()
734 if ((find_vpe_symbols(v, sechdrs, symindex, strtab, &mod)) < 0) { in vpe_elfload()
735 if (v->__start == 0) { in vpe_elfload()
746 return 0; in vpe_elfload()
789 v->len = 0; in vpe_open()
791 v->__start = 0; in vpe_open()
793 return 0; in vpe_open()
801 int ret = 0; in vpe_release()
808 if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) == 0) { in vpe_release()
809 if (vpe_elfload(v) >= 0) { in vpe_release()
825 if (ret < 0) in vpe_release()
829 v->plen = 0; in vpe_release()
892 return 0; in vpe_notify()