1/* 2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23#if defined(__MWERKS__) && !defined(__private_extern__) 24#define __private_extern__ __declspec(private_extern) 25#endif 26 27/* 28 * Global types, variables and routines declared in the file dylibs.c. 29 */ 30 31__private_extern__ enum bool has_dynamic_linker_command; 32 33#ifndef RLD 34 35struct merged_dylib { 36 char *dylib_name; /* The name of this dynamic shared library. */ 37 struct dylib_command *dl; /* The load command for this dynamicly linked */ 38 /* shared library. */ 39 struct object_file /* Pointer to the object file the load */ 40 *definition_object; /* command was found in */ 41 enum bool output_id; /* This is the output file's LC_ID_DYLIB */ 42 /* command others get turned into */ 43 /* LD_LOAD_DYLIB commands */ 44 struct dynamic_library /* The dynamic_library struct for this */ 45 *dynamic_library; /* dynamic library shared library */ 46 struct merged_dylib *next; /* The next in the list, NULL otherwise */ 47}; 48/* the pointer to the head of the dynamicly linked shared library commands */ 49__private_extern__ struct merged_dylib *merged_dylibs; 50 51/* the pointer to the head of the dynamicly linked shared library segments */ 52__private_extern__ struct merged_segment *dylib_segments; 53 54__private_extern__ void create_dylib_id_command( 55 void); 56__private_extern__ void merge_dylibs( 57 enum bool force_weak); 58__private_extern__ void add_dylib_segment( 59 struct segment_command *sg, 60 char *dylib_name, 61 enum bool split_dylib); 62 63struct merged_dylinker { 64 char *dylinker_name; /* The name of dynamic linker */ 65 struct dylinker_command 66 *dyld; /* The load command for the dynamicly linker */ 67 struct object_file /* Pointer to the object file the load */ 68 *definition_object; /* command was found in */ 69}; 70/* the pointer to the merged the dynamic linker command if any */ 71__private_extern__ struct merged_dylinker *merged_dylinker; 72 73__private_extern__ void create_dylinker_id_command( 74 void); 75 76struct merged_sub_frameworks { 77 char *unbrell_name; /* The name of the unbrella framework */ 78 struct sub_framework_command 79 *sub; /* The load command for the output file */ 80}; 81/* the pointer to the merged sub_framework command if any */ 82__private_extern__ struct merged_sub_frameworks *merged_sub_framework; 83 84__private_extern__ void create_sub_framework_command( 85 void); 86 87struct merged_sub_umbrella { 88 struct sub_umbrella_command 89 *sub; /* The load command for the output file */ 90}; 91/* the pointer to the merged sub_umbrella commands if any */ 92__private_extern__ struct merged_sub_umbrella *merged_sub_umbrellas; 93 94__private_extern__ unsigned long create_sub_umbrella_commands( 95 void); 96 97struct merged_sub_library { 98 struct sub_library_command 99 *sub; /* The load command for the output file */ 100}; 101/* the pointer to the merged sub_library commands if any */ 102__private_extern__ struct merged_sub_library *merged_sub_librarys; 103 104__private_extern__ unsigned long create_sub_library_commands( 105 void); 106 107struct merged_sub_client { 108 struct sub_client_command 109 *sub; /* The load command for the output file */ 110}; 111/* the pointer to the merged sub_client commands if any */ 112__private_extern__ struct merged_sub_client *merged_sub_clients; 113 114__private_extern__ unsigned long create_sub_client_commands( 115 void); 116 117#endif /* !defined(RLD) */ 118