Lines Matching defs:file

6  * This file contains Original Code and/or Modifications of Original Code
8 * Version 2.0 (the 'License'). You may not use this file except in
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
51 static void unswap_macho_32(u_char *file, enum NXByteOrder host_order,
53 static void unswap_macho_64(u_char *file, enum NXByteOrder host_order,
267 validate_and_swap_macho_32(u_char *file, u_long size
274 struct mach_header *mach_hdr = (struct mach_header *) ((void *) file);
290 check(file);
293 /* Verify that the file is big enough for the mach header */
314 * (which is the only file of type MH_EXECUTE we should ever see),
328 load_hdr = (struct load_command *) ((void *) (file + offset));
339 /* Verify that the file is big enough to contain the load command */
361 /* Verify that the file is big enough for the segment data. */
369 * demand, that file is big enough for the section's data.
376 /* Verify that the file is big enough for the section's
385 relocs = (struct relocation_info *) ((void *) (file + sects[j].reloff));
402 /* Verify that the file is big enough for the symbol table */
408 /* Verify that the file is big enough for the string table */
415 symtab = (struct nlist *) ((void *) (file + symtab_hdr->symoff));
438 validate_and_swap_macho_64(u_char *file, u_long size
445 struct mach_header_64 *mach_hdr = (struct mach_header_64 *) ((void *) file);
461 check(file);
464 /* Verify that the file is big enough for the mach header */
485 * (which is the only file of type MH_EXECUTE we should ever see),
498 load_hdr = (struct load_command *) ((void *) (file + offset));
509 /* Verify that the file is big enough to contain the load command */
530 /* Verify that the file is big enough for the segment data. */
538 * demand, that file is big enough for the section's data.
545 /* Verify that the file is big enough for the section's
554 relocs = (struct relocation_info *) ((void *) (file + sects[j].reloff));
571 /* Verify that the file is big enough for the symbol table */
577 /* Verify that the file is big enough for the string table */
584 symtab = (struct nlist_64 *) ((void *) (file + symtab_hdr->symoff));
607 void unswap_macho(u_char *file, enum NXByteOrder host_order,
610 struct mach_header *hdr = (struct mach_header *) ((void *) file);
615 unswap_macho_32(file, host_order, target_order);
617 unswap_macho_64(file, host_order, target_order);
624 unswap_macho_32(u_char *file, enum NXByteOrder host_order,
627 struct mach_header *mach_hdr = (struct mach_header *) ((void *) file);
638 check(file);
644 load_hdr = (struct load_command *) ((void *) (file + offset));
662 symtab = (struct nlist*) ((void *) (file + symtab_hdr->symoff));
680 unswap_macho_64(u_char *file, enum NXByteOrder host_order,
683 struct mach_header_64 *mach_hdr = (struct mach_header_64 *) ((void *) file);
694 check(file);
700 load_hdr = (struct load_command *) ((void *) (file + offset));
718 symtab = (struct nlist_64 *) ((void *) (file + symtab_hdr->symoff));