]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_utilities/lib/dyld_cache_format.h
1 /* -*- mode: C++; c-basic-offset: 4; tab-width: 4 -*-
3 * Copyright (c) 2006-2009,2011 Apple Inc. All Rights Reserved.
5 * @APPLE_LICENSE_HEADER_START@
7 * This file contains Original Code and/or Modifications of Original Code
8 * as defined in and that are subject to the Apple Public Source License
9 * Version 2.0 (the 'License'). You may not use this file except in
10 * compliance with the License. Please obtain a copy of the License at
11 * http://www.opensource.apple.com/apsl/ and read it before using this
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
19 * Please see the License for the specific language governing rights and
20 * limitations under the License.
22 * @APPLE_LICENSE_HEADER_END@
24 #ifndef __DYLD_CACHE_FORMAT__
25 #define __DYLD_CACHE_FORMAT__
27 #include <sys/types.h>
29 #include <mach/shared_region.h>
32 struct dyld_cache_header
34 char magic
[16]; // e.g. "dyld_v0 ppc"
35 uint32_t mappingOffset
; // file offset to first dyld_cache_mapping_info
36 uint32_t mappingCount
; // number of dyld_cache_mapping_info entries
37 uint32_t imagesOffset
; // file offset to first dyld_cache_image_info
38 uint32_t imagesCount
; // number of dyld_cache_image_info entries
39 uint64_t dyldBaseAddress
; // base address of dyld when cache was built
40 uint64_t codeSignatureOffset
; // file offset in of code signature blob
41 uint64_t codeSignatureSize
; // size of code signature blob (zero means to end of file)
44 struct dyld_cache_mapping_info
{
52 struct dyld_cache_image_info
57 uint32_t pathFileOffset
;
62 #define DYLD_SHARED_CACHE_DIR "/var/db/dyld/"
63 #define DYLD_SHARED_CACHE_BASE_NAME "dyld_shared_cache_"
67 #endif // __DYLD_CACHE_FORMAT__