ExecutableFileMachO-all.cpp [plain text]
#include <stdint.h>
#include <stddef.h>
#include <fcntl.h>
#include <sys/time.h>
#include <mach-o/loader.h>
#include <mach-o/nlist.h>
#include <mach-o/reloc.h>
#include <mach-o/ppc/reloc.h>
#include <mach-o/stab.h>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include "ObjectFile.h"
#include "ExecutableFile.h"
#include "Options.h"
#undef MACHO_32_SAME_ENDIAN
#undef MACHO_32_OPPOSITE_ENDIAN
#undef MACHO_64_SAME_ENDIAN
#undef MACHO_64_OPPOSITE_ENDIAN
#if __ppc__ || __ppc64__
#define MACHO_64_SAME_ENDIAN
#elif __i386__
#define MACHO_64_OPPOSITE_ENDIAN
#else
#error unknown architecture
#endif
namespace ppc64 {
#undef ARCH_PPC
#define ARCH_PPC64
#undef ARCH_I386
#include "MachOAbstraction.h"
#include "ExecutableFileMachO.cpp"
};
#undef MACHO_32_SAME_ENDIAN
#undef MACHO_32_OPPOSITE_ENDIAN
#undef MACHO_64_SAME_ENDIAN
#undef MACHO_64_OPPOSITE_ENDIAN
#if __ppc__ || __ppc64__
#define MACHO_32_SAME_ENDIAN
#elif __i386__
#define MACHO_32_OPPOSITE_ENDIAN
#else
#error unknown architecture
#endif
namespace ppc {
#define ARCH_PPC
#undef ARCH_PPC64
#undef ARCH_I386
#include "MachOAbstraction.h"
#include "ExecutableFileMachO.cpp"
};
#undef MACHO_32_SAME_ENDIAN
#undef MACHO_32_OPPOSITE_ENDIAN
#undef MACHO_64_SAME_ENDIAN
#undef MACHO_64_OPPOSITE_ENDIAN
#if __ppc__ || __ppc64__
#define MACHO_32_OPPOSITE_ENDIAN
#elif __i386__
#define MACHO_32_SAME_ENDIAN
#else
#error unknown architecture
#endif
#undef i386 // compiler sometimes #defines this
namespace i386 {
#undef ARCH_PPC
#undef ARCH_PPC64
#define ARCH_I386
#include "MachOAbstraction.h"
#include "ExecutableFileMachO.cpp"
};