Lines Matching refs:rval
207 kern_return_t rval = KERN_FAILURE;
226 rval = get_target_machine_info(object, cputype, cpusubtype);
227 require_noerr(rval, finish);
231 rval = get_macho_slice_for_arch(object, file, size);
232 require_noerr(rval, finish);
238 require_action(object->symtab, finish, rval=KERN_RESOURCE_SHORTAGE);
244 rval = kxld_relocator_init(&object->relocator, object->file,
247 require_noerr(rval, finish);
267 rval = init_from_bundle(object);
268 require_noerr(rval, finish);
273 rval = init_from_object(object);
274 require_noerr(rval, finish);
279 rval = init_from_execute(object);
280 require_noerr(rval, finish);
283 rval = KERN_FAILURE;
310 rval = KERN_SUCCESS;
312 return rval;
355 kern_return_t rval = KERN_FAILURE;
361 require_action(host_arch, finish, rval=KERN_FAILURE);
401 rval = KERN_NOT_SUPPORTED;
407 rval = KERN_SUCCESS;
410 return rval;
419 kern_return_t rval = KERN_FAILURE;
438 rval=KERN_FAILURE;
452 rval=KERN_FAILURE;
464 require_action(arch, finish, rval=KERN_FAILURE;
467 rval=KERN_FAILURE;
477 rval = validate_and_swap_macho_32(object->file, object->size
483 rval = validate_and_swap_macho_64(object->file, object->size
489 require_noerr(rval, finish);
493 rval=KERN_FAILURE;
496 rval = KERN_SUCCESS;
498 return rval;
507 kern_return_t rval = KERN_FAILURE;
574 rval = kxld_array_init(&object->segs, sizeof(KXLDSeg), nsegs);
575 require_noerr(rval, finish);
577 rval = kxld_array_init(&object->sects, sizeof(KXLDSect), nsects);
578 require_noerr(rval, finish);
600 rval = kxld_seg_init_from_macho_32(seg, seg_hdr);
601 require_noerr(rval, finish);
618 rval = kxld_seg_init_from_macho_64(seg, seg_hdr);
619 require_noerr(rval, finish);
644 rval = kxld_reloc_create_macho(&object->extrelocs, &object->relocator,
647 require_noerr(rval, finish);
649 rval = kxld_reloc_create_macho(&object->locrelocs, &object->relocator,
652 require_noerr(rval, finish);
659 finish, rval=KERN_FAILURE;
672 rval=KERN_FAILURE;
683 KXLD_3264_FUNC(kxld_object_is_32_bit(object), rval,
686 require_noerr(rval, finish);
691 rval = kxld_seg_add_section(seg, sect);
692 require_noerr(rval, finish);
694 rval = kxld_seg_finish_init(seg);
695 require_noerr(rval, finish);
702 rval = KERN_SUCCESS;
704 return rval;
712 kern_return_t rval = KERN_FAILURE;
725 require_action(kxld_object_is_kernel(object), finish, rval=KERN_FAILURE);
727 rval = init_from_final_linked_image(object, &filetype, &symtab_hdr);
728 require_noerr(rval, finish);
730 require_action(filetype == MH_EXECUTE, finish, rval=KERN_FAILURE;
740 require_action(kernel_linkedit_seg, finish, rval=KERN_FAILURE;
744 KXLD_3264_FUNC(kxld_object_is_32_bit(object), rval,
747 require_noerr(rval, finish);
755 rval = kxld_array_init(object->section_order, sizeof(KXLDSectionName),
757 require_noerr(rval, finish);
776 rval = KERN_SUCCESS;
778 return rval;
795 kern_return_t rval = KERN_FAILURE;
802 rval=KERN_FAILURE;
806 rval = init_from_final_linked_image(object, &filetype, &symtab_hdr);
807 require_noerr(rval, finish);
810 rval=KERN_FAILURE);
812 KXLD_3264_FUNC(kxld_object_is_32_bit(object), rval,
816 require_noerr(rval, finish);
818 rval = KERN_SUCCESS;
820 return rval;
837 kern_return_t rval = KERN_FAILURE;
853 finish, rval=KERN_FAILURE;
861 require_action(filetype == MH_OBJECT, finish, rval=KERN_FAILURE);
889 require_action(kxld_object_is_32_bit(object), finish, rval=KERN_FAILURE;
892 require_action(!has_segment, finish, rval=KERN_FAILURE;
918 require_action(!kxld_object_is_32_bit(object), finish, rval=KERN_FAILURE;
921 require_action(!has_segment, finish, rval=KERN_FAILURE;
934 KXLD_3264_FUNC(kxld_object_is_32_bit(object), rval,
938 require_noerr(rval, finish);
961 rval = KERN_FAILURE;
972 rval = kxld_array_init(&object->sects, sizeof(KXLDSect), nsects);
973 require_noerr(rval, finish);
979 KXLD_3264_FUNC(kxld_object_is_32_bit(object), rval,
982 require_noerr(rval, finish);
988 rval = create_got(object);
989 require_noerr(rval, finish);
993 rval = resolve_common_symbols(object);
994 require_noerr(rval, finish);
999 rval = kxld_seg_create_seg_from_sections(&object->segs, &object->sects);
1000 require_noerr(rval, finish);
1002 rval = kxld_seg_finalize_object_segment(&object->segs,
1004 require_noerr(rval, finish);
1006 rval = kxld_seg_init_linkedit(&object->segs);
1007 require_noerr(rval, finish);
1010 rval = KERN_SUCCESS;
1012 return rval;
1281 const KXLDArray *rval = NULL;
1286 rval = &object->extrelocs;
1289 return rval;
1308 kern_return_t rval = KERN_FAILURE;
1311 rval = kxld_array_resize(&object->sects, nsects + 1);
1312 require_noerr(rval, finish);
1316 rval = KERN_SUCCESS;
1319 return rval;
1332 kern_return_t rval = KERN_FAILURE;
1344 rval = KERN_SUCCESS;
1371 rval = add_section(object, §);
1372 require_noerr(rval, finish);
1379 rval = kxld_array_get_index(&object->sects, sect, §num);
1380 require_noerr(rval, finish);
1394 rval = KERN_SUCCESS;
1397 return rval;
1416 kern_return_t rval = KERN_FAILURE;
1422 rval = KERN_SUCCESS;
1432 rval = add_section(object, §);
1433 require_noerr(rval, finish);
1435 rval = kxld_sect_init_got(sect, ngots);
1436 require_noerr(rval, finish);
1439 rval = KERN_SUCCESS;
1442 return rval;
1450 kern_return_t rval = KERN_FAILURE;
1455 rval = KERN_SUCCESS;
1470 require_action(i < object->sects.nitems, finish, rval=KXLD_MISSING_GOT);
1472 rval = KERN_SUCCESS;
1475 return rval;
1726 kern_return_t rval = KERN_FAILURE;
1769 rval = export_macho_header(object, linked_object, ncmds, &header_offset, header_size);
1770 require_noerr(rval, finish);
1775 rval = kxld_seg_export_macho_to_vm(seg, linked_object, &header_offset,
1777 require_noerr(rval, finish);
1783 rval = kxld_symtab_export_macho(object->symtab, linked_object, &header_offset,
1785 require_noerr(rval, finish);
1789 rval = kxld_reloc_export_macho(&object->relocator, &object->locrelocs,
1792 require_noerr(rval, finish);
1797 rval = kxld_uuid_export_macho(&object->uuid, linked_object, &header_offset, header_size);
1798 require_noerr(rval, finish);
1802 rval = kxld_versionmin_export_macho(&object->versionmin, linked_object, &header_offset, header_size);
1803 require_noerr(rval, finish);
1807 rval = kxld_srcversion_export_macho(&object->srcversion, linked_object, &header_offset, header_size);
1808 require_noerr(rval, finish);
1815 rval = KERN_SUCCESS;
1818 return rval;
1827 kern_return_t rval = KERN_FAILURE;
1833 KXLD_3264_FUNC(kxld_object_is_32_bit(object), rval,
1836 require_noerr(rval, finish);
1838 rval = KERN_SUCCESS;
1841 return rval;
1851 kern_return_t rval = KERN_FAILURE;
1859 rval=KERN_FAILURE);
1872 rval = KERN_SUCCESS;
1875 return rval;
1886 kern_return_t rval = KERN_FAILURE;
1894 rval=KERN_FAILURE);
1907 rval = KERN_SUCCESS;
1910 return rval;
1935 kern_return_t rval = KERN_FAILURE;
1950 rval = kxld_symtab_relocate(object->symtab, &object->sects);
1951 require_noerr(rval, finish);
1953 rval = KERN_SUCCESS;
1955 return rval;
1963 KXLDSym *rval = NULL;
1970 rval = kxld_symtab_get_symbol_by_index(object->symtab, i);
1971 require_action(rval == sym, finish, rval=NULL);
1974 return rval;
1983 kern_return_t rval = KERN_FAILURE;
1987 require_action(resolved_sym, finish, rval=KERN_FAILURE);
1989 rval = kxld_sym_resolve(resolved_sym, addr);
1990 require_noerr(rval, finish);
1992 rval = KERN_SUCCESS;
1994 return rval;
2002 kern_return_t rval = KERN_FAILURE;
2006 require_action(patched_sym, finish, rval=KERN_FAILURE);
2009 rval = KERN_SUCCESS;
2011 return rval;
2020 kern_return_t rval = KERN_FAILURE;
2023 rval = kxld_symtab_add_symbol(object->symtab, name, link_addr, &sym);
2024 require_noerr(rval, finish);
2027 rval = KERN_SUCCESS;
2029 return rval;
2038 kern_return_t rval = KERN_FAILURE;
2054 rval = process_symbol_pointers(object);
2055 require_noerr(rval, finish);
2057 rval = process_relocs_from_tables(object);
2058 require_noerr(rval, finish);
2060 require_action(FALSE, finish, rval=KERN_FAILURE);
2065 rval = populate_got(object);
2066 require_noerr(rval, finish);
2069 rval = process_relocs_from_sections(object);
2070 require_noerr(rval, finish);
2072 require_action(FALSE, finish, rval=KERN_FAILURE);
2077 rval = populate_kmod_info(object);
2078 require_noerr(rval, finish);
2080 rval = KERN_SUCCESS;
2082 return rval;
2099 kern_return_t rval = KERN_FAILURE;
2112 finish, rval=KERN_FAILURE);
2120 rval = KERN_SUCCESS;
2136 finish, rval=KERN_FAILURE;
2160 require_action(sym, finish, rval=KERN_FAILURE);
2166 rval = KERN_SUCCESS;
2168 return rval;
2197 kern_return_t rval = KERN_FAILURE;
2207 require_action(seg, finish, rval=KERN_FAILURE);
2209 rval = kxld_relocator_process_table_reloc(&object->relocator, reloc,
2211 require_noerr(rval, finish);
2219 require_action(seg, finish, rval=KERN_FAILURE);
2221 rval = kxld_relocator_process_table_reloc(&object->relocator, reloc,
2223 require_noerr(rval, finish);
2226 rval = KERN_SUCCESS;
2228 return rval;
2252 kern_return_t rval = KERN_FAILURE;
2258 rval = kxld_sect_process_relocs(sect, &object->relocator);
2259 require_noerr(rval, finish);
2262 rval = KERN_SUCCESS;
2264 return rval;
2273 kern_return_t rval = KERN_FAILURE;
2282 rval = KERN_SUCCESS;
2290 require_action(kmodsym, finish, rval=KERN_FAILURE;
2326 rval = KERN_SUCCESS;
2329 return rval;