]>
git.saurik.com Git - apple/ld64.git/blob - src/Writers/ExecutableFileMachO-all.cpp
661a3dfcfc9321fceaf07f254f064961510f8516
2 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
28 #include <mach-o/loader.h>
29 #include <mach-o/nlist.h>
30 #include <mach-o/reloc.h>
31 #include <mach-o/ppc/reloc.h>
32 #include <mach-o/stab.h>
39 #include "ObjectFile.h"
40 #include "ExecutableFile.h"
43 // buiild Writer for -arch ppc64
44 #undef MACHO_32_SAME_ENDIAN
45 #undef MACHO_32_OPPOSITE_ENDIAN
46 #undef MACHO_64_SAME_ENDIAN
47 #undef MACHO_64_OPPOSITE_ENDIAN
48 #if __ppc__ || __ppc64__
49 #define MACHO_64_SAME_ENDIAN
51 #define MACHO_64_OPPOSITE_ENDIAN
53 #error unknown architecture
59 #include "MachOAbstraction.h"
60 #include "ExecutableFileMachO.cpp"
63 // buiild Writer for -arch ppc
64 #undef MACHO_32_SAME_ENDIAN
65 #undef MACHO_32_OPPOSITE_ENDIAN
66 #undef MACHO_64_SAME_ENDIAN
67 #undef MACHO_64_OPPOSITE_ENDIAN
68 #if __ppc__ || __ppc64__
69 #define MACHO_32_SAME_ENDIAN
71 #define MACHO_32_OPPOSITE_ENDIAN
73 #error unknown architecture
79 #include "MachOAbstraction.h"
80 #include "ExecutableFileMachO.cpp"
83 // buiild Writer for -arch i386
84 #undef MACHO_32_SAME_ENDIAN
85 #undef MACHO_32_OPPOSITE_ENDIAN
86 #undef MACHO_64_SAME_ENDIAN
87 #undef MACHO_64_OPPOSITE_ENDIAN
88 #if __ppc__ || __ppc64__
89 #define MACHO_32_OPPOSITE_ENDIAN
91 #define MACHO_32_SAME_ENDIAN
93 #error unknown architecture
95 #undef i386 // compiler sometimes #defines this
100 #include "MachOAbstraction.h"
101 #include "ExecutableFileMachO.cpp"