Lines Matching refs:rval
119 kern_return_t rval = KERN_FAILURE;
129 rval = kxld_object_index_symbols_by_name(kext->kext);
130 require_noerr(rval, finish);
133 rval = KERN_SUCCESS;
135 return rval;
190 kern_return_t rval = KERN_FAILURE;
195 rval = export_symbols_through_interface(kext->kext, kext->interface,
198 require_noerr(rval, finish);
200 rval = export_symbols(kext->kext, defined_symbols_by_name,
202 require_noerr(rval, finish);
205 rval = KERN_SUCCESS;
207 return rval;
217 kern_return_t rval = KERN_FAILURE;
245 rval = kxld_dict_insert(defined_symbols_by_name,
247 require_noerr(rval, finish);
264 rval = kxld_dict_insert(defined_symbols_by_name,
266 require_noerr(rval, finish);
275 rval = kxld_dict_insert(obsolete_symbols_by_name,
277 require_noerr(rval, finish);
286 rval = kxld_dict_insert(defined_cxx_symbols_by_value,
288 require_noerr(rval, finish);
292 rval = KERN_SUCCESS;
294 return rval;
303 kern_return_t rval = KERN_FAILURE;
311 rval = kxld_dict_insert(defined_symbols_by_name, sym->name, sym);
312 require_noerr(rval, finish);
316 rval = kxld_dict_insert(defined_cxx_symbols_by_value,
318 require_noerr(rval, finish);
322 rval = KERN_SUCCESS;
324 return rval;
333 kern_return_t rval = KERN_FAILURE;
342 rval = create_vtables(kext, defined_cxx_symbols, defined_symbols);
343 require_noerr(rval, finish);
348 rval = kxld_dict_insert(vtables, vtable->name, vtable);
349 require_noerr(rval, finish);
352 rval = KERN_SUCCESS;
354 return rval;
381 kern_return_t rval = KERN_FAILURE;
386 require_action(kmodsym, finish, rval=KERN_FAILURE;
391 rval = kxld_object_export_linked_object(kext->kext, linked_object);
393 return rval;
403 kern_return_t rval = KERN_FAILURE;
417 rval = kxld_object_index_cxx_symbols_by_value(kext->kext);
418 require_noerr(rval, finish);
420 rval = kxld_object_index_symbols_by_name(kext->kext);
421 require_noerr(rval, finish);
423 rval = kxld_object_relocate(kext->kext, link_address);
424 require_noerr(rval, finish);
426 rval = resolve_symbols(kext, defined_symbols, obsolete_symbols);
427 require_noerr(rval, finish);
429 rval = create_vtables(kext, defined_cxx_symbols, /* defined_symbols */ NULL);
430 require_noerr(rval, finish);
432 rval = patch_vtables(kext, patched_vtables, defined_symbols);
433 require_noerr(rval, finish);
435 rval = validate_symbols(kext);
436 require_noerr(rval, finish);
438 rval = kxld_object_process_relocations(kext->kext, patched_vtables);
439 require_noerr(rval, finish);
441 rval = KERN_SUCCESS;
443 return rval;
464 kern_return_t rval = KERN_FAILURE;
476 rval = KERN_SUCCESS;
497 rval = kxld_array_init(&kext->vtables, sizeof(KXLDVTable), nvtables);
498 require_noerr(rval, finish);
506 rval = get_vtable_syms_from_smcp(kext, defined_symbols, sym,
508 require_noerr(rval, finish);
512 rval = kxld_vtable_init(vtable, vtable_sym, kext->kext,
514 require_noerr(rval, finish);
523 rval = kxld_vtable_init(meta_vtable, meta_vtable_sym,
525 require_noerr(rval, finish);
533 rval=KERN_FAILURE);
536 rval = KERN_SUCCESS;
538 return rval;
548 kern_return_t rval = KERN_FAILURE;
569 rval = kxld_sym_get_class_name_from_super_metaclass_pointer(
571 require_noerr(rval, finish);
574 rval = kxld_sym_get_vtable_name_from_class_name(class_name,
576 require_noerr(rval, finish);
585 require_action(vtable_sym, finish, rval=KERN_FAILURE;
590 rval = kxld_sym_get_meta_vtable_name_from_class_name(class_name,
592 require_noerr(rval, finish);
606 rval = KERN_FAILURE;
620 rval = KERN_SUCCESS;
625 return rval;
634 kern_return_t rval = KERN_FAILURE;
677 require_noerr_action(error, finish, rval=KERN_FAILURE);
722 rval = kxld_sym_resolve(sym, defined_sym->link_addr);
723 require_noerr(rval, finish);
737 rval=KERN_FAILURE;
754 rval = kxld_sym_resolve(sym, addr);
755 require_noerr(rval, finish);
759 require_noerr_action(error, finish, rval=KERN_FAILURE);
761 rval = KERN_SUCCESS;
766 return rval;
798 kern_return_t rval = KERN_FAILURE;
826 rval = create_vtable_index(kext);
827 require_noerr(rval, finish);
842 rval = kxld_sym_get_class_name_from_super_metaclass_pointer(
844 require_noerr(rval, finish);
847 rval = kxld_sym_get_vtable_name_from_class_name(class_name,
849 require_noerr(rval, finish);
853 require_action(vtable, finish, rval=KERN_FAILURE;
862 require_action(metaclass, finish, rval=KERN_FAILURE);
865 rval = kxld_sym_get_class_name_from_metaclass(metaclass,
867 require_noerr(rval, finish);
870 rval = kxld_sym_get_vtable_name_from_class_name(super_class_name,
872 require_noerr(rval, finish);
901 rval = kxld_sym_get_final_sym_name_from_class_name(super_class_name,
903 require_noerr(rval, finish);
924 rval = kxld_vtable_patch(vtable, super_vtable, kext->kext);
925 if (rval) continue;
928 rval = kxld_dict_insert(patched_vtables, vtable->name, vtable);
929 require_noerr(rval, finish);
932 rval = kxld_sym_get_meta_vtable_name_from_class_name(class_name,
934 require_noerr(rval, finish);
946 require_action(!vtable->is_patched, finish, rval=KERN_FAILURE);
955 finish, rval=KERN_FAILURE);
960 finish, rval=KERN_FAILURE);
963 rval = kxld_vtable_patch(vtable, super_vtable, kext->kext);
964 require_noerr(rval, finish);
967 rval = kxld_dict_insert(patched_vtables, vtable->name, vtable);
968 require_noerr(rval, finish);
976 require_action(!failure, finish, rval=KERN_FAILURE);
980 rval = KERN_SUCCESS;
985 return rval;
993 kern_return_t rval = KERN_FAILURE;
998 rval = KERN_SUCCESS;
1003 rval = kxld_dict_init(&kext->vtable_index, kxld_dict_string_hash,
1005 require_noerr(rval, finish);
1009 rval = kxld_dict_insert(&kext->vtable_index, vtable->name, vtable);
1010 require_noerr(rval, finish);
1014 rval = KERN_SUCCESS;
1016 return rval;
1025 kern_return_t rval = KERN_FAILURE;
1036 require_action(reloc, finish, rval=KERN_FAILURE);
1041 require_action(sect, finish, rval=KERN_FAILURE);
1054 kern_return_t rval = KERN_FAILURE;
1073 require_noerr_action(error, finish, rval=KERN_FAILURE);
1075 rval = KERN_SUCCESS;
1079 return rval;