]>
git.saurik.com Git - apple/ld64.git/blob - src/Readers/ObjectFileMachO-all.cpp
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@
25 #include <sys/types.h>
38 #include <mach-o/loader.h>
39 #include <mach-o/nlist.h>
40 #include <mach-o/reloc.h>
41 #include <mach-o/ppc/reloc.h>
42 #include <mach-o/ranlib.h>
43 #include <mach-o/stab.h>
45 #include "ObjectFile.h"
51 // buiild Writer for -arch ppc64
52 #undef MACHO_32_SAME_ENDIAN
53 #undef MACHO_32_OPPOSITE_ENDIAN
54 #undef MACHO_64_SAME_ENDIAN
55 #undef MACHO_64_OPPOSITE_ENDIAN
56 #if __ppc__ || __ppc64__
57 #define MACHO_64_SAME_ENDIAN
59 #define MACHO_64_OPPOSITE_ENDIAN
61 #error unknown architecture
67 #include "MachOAbstraction.h"
68 #include "ObjectFileMachO.cpp"
69 #include "ObjectFileDylibMachO.cpp"
70 #include "ObjectFileArchiveMachO.cpp"
73 // buiild Writer for -arch ppc
74 #undef MACHO_32_SAME_ENDIAN
75 #undef MACHO_32_OPPOSITE_ENDIAN
76 #undef MACHO_64_SAME_ENDIAN
77 #undef MACHO_64_OPPOSITE_ENDIAN
78 #if __ppc__ || __ppc64__
79 #define MACHO_32_SAME_ENDIAN
81 #define MACHO_32_OPPOSITE_ENDIAN
83 #error unknown architecture
89 #include "MachOAbstraction.h"
90 #include "ObjectFileMachO.cpp"
91 #include "ObjectFileDylibMachO.cpp"
92 #include "ObjectFileArchiveMachO.cpp"
96 // buiild Writer for -arch i386
97 #undef MACHO_32_SAME_ENDIAN
98 #undef MACHO_32_OPPOSITE_ENDIAN
99 #undef MACHO_64_SAME_ENDIAN
100 #undef MACHO_64_OPPOSITE_ENDIAN
101 #if __ppc__ || __ppc64__
102 #define MACHO_32_OPPOSITE_ENDIAN
104 #define MACHO_32_SAME_ENDIAN
106 #error unknown architecture
108 #undef i386 // compiler sometimes #defines this
113 #include "MachOAbstraction.h"
114 #include "ObjectFileMachO.cpp"
115 #include "ObjectFileDylibMachO.cpp"
116 #include "ObjectFileArchiveMachO.cpp"