summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
Diffstat (limited to 'rts')
-rw-r--r--rts/Adjustor.c32
-rw-r--r--rts/AdjustorAsm.S102
-rw-r--r--rts/RtsSymbols.c9
-rw-r--r--rts/StgCRun.c40
-rw-r--r--rts/linker/LoadArchive.c8
-rw-r--r--rts/linker/MachO.c267
-rw-r--r--rts/linker/MachOTypes.h5
7 files changed, 47 insertions, 416 deletions
diff --git a/rts/Adjustor.c b/rts/Adjustor.c
index 476d63140e..d360cfe87b 100644
--- a/rts/Adjustor.c
+++ b/rts/Adjustor.c
@@ -287,32 +287,12 @@ extern void obscure_ccall_ret_code(void);
*/
typedef struct AdjustorStub {
-#if defined(powerpc_HOST_ARCH) && defined(darwin_HOST_OS)
- unsigned lis;
- unsigned ori;
- unsigned lwz;
- unsigned mtctr;
- unsigned bctr;
- StgFunPtr code;
-#elif defined(powerpc64_HOST_ARCH) && defined(darwin_HOST_OS)
- /* powerpc64-darwin: just guessing that it won't use fundescs. */
- unsigned lis;
- unsigned ori;
- unsigned rldimi;
- unsigned oris;
- unsigned ori2;
- unsigned lwz;
- unsigned mtctr;
- unsigned bctr;
- StgFunPtr code;
-#else
/* fundesc-based ABIs */
#define FUNDESCS
StgFunPtr code;
struct AdjustorStub
*toc;
void *env;
-#endif
StgStablePtr hptr;
StgFunPtr wptr;
StgInt negative_framesize;
@@ -1036,20 +1016,16 @@ TODO: Depending on how much allocation overhead stgMallocBytes uses for
whose stack layout is based on the AIX ABI.
Besides (obviously) AIX, this includes
- Mac OS 9 and BeOS/PPC (may they rest in peace),
+ Mac OS 9 and BeOS/PPC and Mac OS X PPC (may they rest in peace),
which use the 32-bit AIX ABI
powerpc64-linux,
- which uses the 64-bit AIX ABI
- and Darwin (Mac OS X),
- which uses the same stack layout as AIX,
- but no function descriptors.
+ which uses the 64-bit AIX ABI.
The actual stack-frame shuffling is implemented out-of-line
in the function adjustorCode, in AdjustorAsm.S.
Here, we set up an AdjustorStub structure, which
- is a function descriptor (on platforms that have function
- descriptors) or a short piece of stub code (on Darwin) to call
- adjustorCode with a pointer to the AdjustorStub struct loaded
+ is a function descriptor with a pointer to the AdjustorStub
+ struct in the position of the TOC that is loaded
into register r2.
One nice thing about this is that there is _no_ code generated at
diff --git a/rts/AdjustorAsm.S b/rts/AdjustorAsm.S
index ba08548f84..2795b83b63 100644
--- a/rts/AdjustorAsm.S
+++ b/rts/AdjustorAsm.S
@@ -30,39 +30,13 @@
/* The following defines mirror struct AdjustorStub
from Adjustor.c. Make sure to keep these in sync.
*/
-#if defined(powerpc_HOST_ARCH) && defined(darwin_HOST_OS)
-#define HEADER_WORDS 6
-#elif defined(powerpc64_HOST_ARCH) && defined(darwin_HOST_OS)
-#else
#define HEADER_WORDS 3
-#endif
#define HPTR_OFF ((HEADER_WORDS )*WS)
#define WPTR_OFF ((HEADER_WORDS + 1)*WS)
#define FRAMESIZE_OFF ((HEADER_WORDS + 2)*WS)
#define EXTRA_WORDS_OFF ((HEADER_WORDS + 3)*WS)
- /* Darwin insists on register names, everyone else prefers
- to use numbers. */
-#if !defined(darwin_HOST_OS)
-#define r0 0
-#define r1 1
-#define r2 2
-#define r3 3
-#define r4 4
-#define r5 5
-#define r6 6
-#define r7 7
-#define r8 8
-#define r9 9
-#define r10 10
-#define r11 11
-#define r12 12
-
-#define r30 30
-#define r31 31
-#endif
-
#if defined(aix_HOST_OS)
/* IBM's assembler needs a different pseudo-op to declare a .text section */
.csect .text[PR]
@@ -83,69 +57,65 @@ adjustorCode:
/* On entry, r2 will point to the AdjustorStub data structure. */
/* save the link */
- mflr r0
- STORE r0, LINK_SLOT(r1)
+ mflr 0
+ STORE 0, LINK_SLOT(1)
/* set up stack frame */
- LOAD r12, FRAMESIZE_OFF(r2)
+ LOAD 12, FRAMESIZE_OFF(2)
#if defined(powerpc64_HOST_ARCH)
- stdux r1, r1, r12
+ stdux 1, 1, 12
#else
- stwux r1, r1, r12
+ stwux 1, 1, 12
#endif
/* Save some regs so that we can use them.
Note that we use the "Red Zone" below the stack pointer.
*/
- STORE r31, -WS(r1)
- STORE r30, -2*WS(r1)
+ STORE 31, -WS(1)
+ STORE 30, -2*WS(1)
- mr r31, r1
- subf r30, r12, r31
+ mr 31, 1
+ subf 30, 12, 31
- LOAD r12, EXTRA_WORDS_OFF(r2)
- mtctr r12
+ LOAD 12, EXTRA_WORDS_OFF(2)
+ mtctr 12
b L2
L1:
- LOAD r0, LINKAGE_AREA_SIZE + 8*WS(r30)
- STORE r0, LINKAGE_AREA_SIZE + 10*WS(r31)
- addi r30, r30, WS
- addi r31, r31, WS
+ LOAD 0, LINKAGE_AREA_SIZE + 8*WS(30)
+ STORE 0, LINKAGE_AREA_SIZE + 10*WS(31)
+ addi 30, 30, WS
+ addi 31, 31, WS
L2:
bdnz L1
/* Restore r30 and r31 now.
*/
- LOAD r31, -WS(r1)
- LOAD r30, -2*WS(r1)
-
- STORE r10, LINKAGE_AREA_SIZE + 9*WS(r1)
- STORE r9, LINKAGE_AREA_SIZE + 8*WS(r1)
- mr r10, r8
- mr r9, r7
- mr r8, r6
- mr r7, r5
- mr r6, r4
- mr r5, r3
-
- LOAD r3, HPTR_OFF(r2)
-
- LOAD r12, WPTR_OFF(r2)
-#if defined(darwin_HOST_OS)
- mtctr r12
-#else
- LOAD r0, 0(r12)
+ LOAD 31, -WS(1)
+ LOAD 30, -2*WS(1)
+
+ STORE 10, LINKAGE_AREA_SIZE + 9*WS(1)
+ STORE 9, LINKAGE_AREA_SIZE + 8*WS(1)
+ mr 10, 8
+ mr 9, 7
+ mr 8, 6
+ mr 7, 5
+ mr 6, 4
+ mr 5, 3
+
+ LOAD 3, HPTR_OFF(2)
+
+ LOAD 12, WPTR_OFF(2)
+ LOAD 0, 0(12)
/* The function we're calling will never be a nested function,
so we don't load r11.
*/
- mtctr r0
- LOAD r2, WS(r12)
-#endif
+ mtctr 0
+ LOAD 2, WS(12)
bctrl
- LOAD r1, 0(r1)
- LOAD r0, LINK_SLOT(r1)
- mtlr r0
+ LOAD 1, 0(1)
+ LOAD 0, LINK_SLOT(1)
+ mtlr 0
blr
#endif
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index 123ee76778..404756e8cd 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -961,15 +961,6 @@
#define RTS_LIBGCC_SYMBOLS
#endif
-#if defined(darwin_HOST_OS) && defined(powerpc_HOST_ARCH)
- // Symbols that don't have a leading underscore
- // on Mac OS X. They have to receive special treatment,
- // see machoInitSymbolsWithoutUnderscore()
-#define RTS_MACHO_NOUNDERLINE_SYMBOLS \
- SymI_NeedsProto(saveFP) \
- SymI_NeedsProto(restFP)
-#endif
-
/* entirely bogus claims about types of these symbols */
#define SymI_NeedsProto(vvv) extern void vvv(void);
#define SymI_NeedsDataProto(vvv) extern StgWord vvv[];
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index e1b9a09359..3ce41a6483 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -632,56 +632,16 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
#define STG_GLOBAL ".globl "
-#if defined(darwin_HOST_OS)
-#define STG_HIDDEN ".private_extern "
-#else
#define STG_HIDDEN ".hidden "
-#endif
#if defined(aix_HOST_OS)
// implementation is in StgCRunAsm.S
-#elif defined(darwin_HOST_OS)
-void StgRunIsImplementedInAssembler(void)
-{
-#if HAVE_SUBSECTIONS_VIA_SYMBOLS
- // if the toolchain supports deadstripping, we have to
- // prevent it here (it tends to get confused here).
- __asm__ volatile (".no_dead_strip _StgRunIsImplementedInAssembler\n");
-#endif
- __asm__ volatile (
- STG_GLOBAL STG_RUN "\n"
- STG_HIDDEN STG_RUN "\n"
- STG_RUN ":\n"
- "\tmflr r0\n"
- "\tbl saveFP # f14\n"
- "\tstmw r13,-220(r1)\n"
- "\tstwu r1,-%0(r1)\n"
- "\tmr r27,r4\n" // BaseReg == r27
- "\tmtctr r3\n"
- "\tmr r12,r3\n"
- "\tbctr\n"
- ".globl _StgReturn\n"
- "_StgReturn:\n"
- "\tmr r3,r14\n"
- "\tla r1,%0(r1)\n"
- "\tlmw r13,-220(r1)\n"
- "\tb restFP # f14\n"
- : : "i"(RESERVED_C_STACK_BYTES+224 /*stack frame size*/));
-}
#else
// This version is for PowerPC Linux.
-// Differences from the Darwin/Mac OS X version:
-// *) Different Assembler Syntax
-// *) Doesn't use Register Saving Helper Functions (although they exist somewhere)
-// *) We may not access positive stack offsets
-// (no "Red Zone" as in the Darwin ABI)
-// *) The Link Register is saved to a different offset in the caller's stack frame
-// (Linux: 4(r1), Darwin 8(r1))
-
static void GNUC3_ATTRIBUTE(used)
StgRunIsImplementedInAssembler(void)
{
diff --git a/rts/linker/LoadArchive.c b/rts/linker/LoadArchive.c
index 8c32585681..d03b416f1e 100644
--- a/rts/linker/LoadArchive.c
+++ b/rts/linker/LoadArchive.c
@@ -47,15 +47,11 @@ static StgBool loadFatArchive(char tmp[static 20], FILE* f, pathchar* path)
#elif defined(x86_64_HOST_ARCH)
const uint32_t mycputype = CPU_TYPE_X86_64;
const uint32_t mycpusubtype = CPU_SUBTYPE_X86_64_ALL;
-#elif defined(powerpc_HOST_ARCH)
- const uint32_t mycputype = CPU_TYPE_POWERPC;
- const uint32_t mycpusubtype = CPU_SUBTYPE_POWERPC_ALL;
-#elif defined(powerpc64_HOST_ARCH)
- const uint32_t mycputype = CPU_TYPE_POWERPC64;
- const uint32_t mycpusubtype = CPU_SUBTYPE_POWERPC_ALL;
#elif defined(aarch64_HOST_ARCH)
const uint32_t mycputype = CPU_TYPE_ARM64;
const uint32_t mycpusubtype = CPU_SUBTYPE_ARM64_ALL;
+#elif defined(powerpc_HOST_ARCH) || defined(powerpc64_HOST_ARCH)
+#error No Darwin support on PowerPC
#else
#error Unknown Darwin architecture
#endif
diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c
index 10e9629e9d..c6a6c28440 100644
--- a/rts/linker/MachO.c
+++ b/rts/linker/MachO.c
@@ -179,47 +179,7 @@ resolveImports(
unsigned long *indirectSyms);
#if NEED_SYMBOL_EXTRAS
-#if defined(powerpc_HOST_ARCH)
-int
-ocAllocateSymbolExtras_MachO(ObjectCode* oc)
-{
-
- IF_DEBUG(linker, debugBelch("ocAllocateSymbolExtras_MachO: start\n"));
-
- // Find out the first and last undefined external
- // symbol, so we don't have to allocate too many
- // jump islands/GOT entries.
-
- unsigned min = oc->info->symCmd->nsyms, max = 0;
-
- for (unsigned i = 0; i < oc->info->symCmd->nsyms; i++) {
-
- if (oc->info->nlist[i].n_type & N_STAB) {
- ;
- } else if (oc->info->nlist[i].n_type & N_EXT) {
-
- if((oc->info->nlist[i].n_type & N_TYPE) == N_UNDF
- && (oc->info->nlist[i].n_value == 0)) {
-
- if (i < min) {
- min = i;
- }
-
- if (i > max) {
- max = i;
- }
- }
- }
- }
-
- if (max >= min) {
- return ocAllocateSymbolExtras(oc, max - min + 1, min);
- }
-
- return ocAllocateSymbolExtras(oc,0,0);
-}
-
-#elif defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
+#if defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
int
ocAllocateSymbolExtras_MachO(ObjectCode* oc)
@@ -250,8 +210,7 @@ ocVerifyImage_MachO(ObjectCode * oc)
IF_DEBUG(linker, debugBelch("ocVerifyImage_MachO: start\n"));
-#if defined(x86_64_HOST_ARCH) || defined(powerpc64_HOST_ARCH) \
- || defined(aarch64_HOST_ARCH)
+#if defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
if(header->magic != MH_MAGIC_64) {
errorBelch("Could not load image %s: bad magic!\n"
" Expected %08x (64bit), got %08x%s\n",
@@ -1042,16 +1001,8 @@ relocateSection(
scat->r_value)
- scat->r_value;
}
-#if defined(powerpc_HOST_ARCH)
- else if(scat->r_type == PPC_RELOC_SECTDIFF
- || scat->r_type == PPC_RELOC_LO16_SECTDIFF
- || scat->r_type == PPC_RELOC_HI16_SECTDIFF
- || scat->r_type == PPC_RELOC_HA16_SECTDIFF
- || scat->r_type == PPC_RELOC_LOCAL_SECTDIFF)
-#else /* powerpc_HOST_ARCH */
else if(scat->r_type == GENERIC_RELOC_SECTDIFF
|| scat->r_type == GENERIC_RELOC_LOCAL_SECTDIFF)
-#endif /* powerpc_HOST_ARCH */
{
MachOScatteredRelocationInfo *pair =
(MachOScatteredRelocationInfo*) &relocs[i+1];
@@ -1066,48 +1017,6 @@ relocateSection(
- relocateAddress(oc, nSections, sections, pair->r_value));
i++;
}
-#if defined(powerpc_HOST_ARCH)
- else if(scat->r_type == PPC_RELOC_HI16
- || scat->r_type == PPC_RELOC_LO16
- || scat->r_type == PPC_RELOC_HA16
- || scat->r_type == PPC_RELOC_LO14)
- { // these are generated by label+offset things
- MachORelocationInfo *pair = &relocs[i+1];
-
- if ((pair->r_address & R_SCATTERED) || pair->r_type != PPC_RELOC_PAIR) {
- barf("Invalid Mach-O file: "
- "PPC_RELOC_* not followed by PPC_RELOC_PAIR");
- }
-
- if(scat->r_type == PPC_RELOC_LO16)
- {
- word = ((unsigned short*) wordPtr)[1];
- word |= ((unsigned long) relocs[i+1].r_address & 0xFFFF) << 16;
- }
- else if(scat->r_type == PPC_RELOC_LO14)
- {
- barf("Unsupported Relocation: PPC_RELOC_LO14");
- word = ((unsigned short*) wordPtr)[1] & 0xFFFC;
- word |= ((unsigned long) relocs[i+1].r_address & 0xFFFF) << 16;
- }
- else if(scat->r_type == PPC_RELOC_HI16)
- {
- word = ((unsigned short*) wordPtr)[1] << 16;
- word |= ((unsigned long) relocs[i+1].r_address & 0xFFFF);
- }
- else if(scat->r_type == PPC_RELOC_HA16)
- {
- word = ((unsigned short*) wordPtr)[1] << 16;
- word += ((short)relocs[i+1].r_address & (short)0xFFFF);
- }
-
-
- word += (unsigned long) relocateAddress(oc, nSections, sections, scat->r_value)
- - scat->r_value;
-
- i++;
- }
-#endif /* powerpc_HOST_ARCH */
else {
barf ("Don't know how to handle this Mach-O "
"scattered relocation entry: "
@@ -1119,35 +1028,12 @@ relocateSection(
return 0;
}
-#if defined(powerpc_HOST_ARCH)
- if(scat->r_type == GENERIC_RELOC_VANILLA
- || scat->r_type == PPC_RELOC_SECTDIFF)
-#else /* powerpc_HOST_ARCH */
if(scat->r_type == GENERIC_RELOC_VANILLA
|| scat->r_type == GENERIC_RELOC_SECTDIFF
|| scat->r_type == GENERIC_RELOC_LOCAL_SECTDIFF)
-#endif /* powerpc_HOST_ARCH */
{
*wordPtr = word;
}
-#if defined(powerpc_HOST_ARCH)
- else if (scat->r_type == PPC_RELOC_LO16_SECTDIFF
- || scat->r_type == PPC_RELOC_LO16)
- {
- ((unsigned short*) wordPtr)[1] = word & 0xFFFF;
- }
- else if (scat->r_type == PPC_RELOC_HI16_SECTDIFF
- || scat->r_type == PPC_RELOC_HI16)
- {
- ((unsigned short*) wordPtr)[1] = (word >> 16) & 0xFFFF;
- }
- else if (scat->r_type == PPC_RELOC_HA16_SECTDIFF
- || scat->r_type == PPC_RELOC_HA16)
- {
- ((unsigned short*) wordPtr)[1] = ((word >> 16) & 0xFFFF)
- + ((word & (1<<15)) ? 1 : 0);
- }
-#endif /* powerpc_HOST_ARCH */
}
else
{
@@ -1184,40 +1070,13 @@ relocateSection(
if (reloc->r_length == 2) {
unsigned long word = 0;
-#if defined(powerpc_HOST_ARCH)
- unsigned long jumpIsland = 0;
- long offsetToJumpIsland = 0xBADBAD42; // initialise to bad value
- // to avoid warning and to catch
- // bugs.
-#endif /* powerpc_HOST_ARCH */
-
unsigned long* wordPtr = (unsigned long*) (image + sect->offset + reloc->r_address);
- /* In this check we assume that sizeof(unsigned long) = 2 * sizeof(unsigned short)
- on powerpc_HOST_ARCH */
checkProddableBlock(oc,wordPtr, sizeof(unsigned long));
if (reloc->r_type == GENERIC_RELOC_VANILLA) {
word = *wordPtr;
}
-#if defined(powerpc_HOST_ARCH)
- else if (reloc->r_type == PPC_RELOC_LO16) {
- word = ((unsigned short*) wordPtr)[1];
- word |= ((unsigned long) relocs[i+1].r_address & 0xFFFF) << 16;
- }
- else if (reloc->r_type == PPC_RELOC_HI16) {
- word = ((unsigned short*) wordPtr)[1] << 16;
- word |= ((unsigned long) relocs[i+1].r_address & 0xFFFF);
- }
- else if (reloc->r_type == PPC_RELOC_HA16) {
- word = ((unsigned short*) wordPtr)[1] << 16;
- word += ((short)relocs[i+1].r_address & (short)0xFFFF);
- }
- else if (reloc->r_type == PPC_RELOC_BR24) {
- word = *wordPtr;
- word = (word & 0x03FFFFFC) | ((word & 0x02000000) ? 0xFC000000 : 0);
- }
-#endif /* powerpc_HOST_ARCH */
else {
barf("Can't handle this Mach-O relocation entry "
"(not scattered): "
@@ -1246,20 +1105,6 @@ relocateSection(
}
if (reloc->r_pcrel) {
-#if defined(powerpc_HOST_ARCH)
- // In the .o file, this should be a relative jump to NULL
- // and we'll change it to a relative jump to the symbol
- ASSERT(word + reloc->r_address == 0);
- jumpIsland = (unsigned long)
- &makeSymbolExtra(oc,
- reloc->r_symbolnum,
- (unsigned long) symbolAddress)
- -> jumpIsland;
- if (jumpIsland != 0) {
- offsetToJumpIsland = word + jumpIsland
- - (((long)image) + sect->offset - sect->addr);
- }
-#endif /* powerpc_HOST_ARCH */
word += (unsigned long) symbolAddress
- (((long)image) + sect->offset - sect->addr);
}
@@ -1272,60 +1117,6 @@ relocateSection(
*wordPtr = word;
continue;
}
-#if defined(powerpc_HOST_ARCH)
- else if(reloc->r_type == PPC_RELOC_LO16)
- {
- ((unsigned short*) wordPtr)[1] = word & 0xFFFF;
- i++;
- continue;
- }
- else if(reloc->r_type == PPC_RELOC_HI16)
- {
- ((unsigned short*) wordPtr)[1] = (word >> 16) & 0xFFFF;
- i++;
- continue;
- }
- else if(reloc->r_type == PPC_RELOC_HA16)
- {
- ((unsigned short*) wordPtr)[1] = ((word >> 16) & 0xFFFF)
- + ((word & (1<<15)) ? 1 : 0);
- i++;
- continue;
- }
- else if(reloc->r_type == PPC_RELOC_BR24)
- {
- if ((word & 0x03) != 0) {
- barf("%s: unconditional relative branch with a displacement "
- "which isn't a multiple of 4 bytes: %#lx",
- OC_INFORMATIVE_FILENAME(oc),
- word);
- }
-
- if((word & 0xFE000000) != 0xFE000000 &&
- (word & 0xFE000000) != 0x00000000) {
- // The branch offset is too large.
- // Therefore, we try to use a jump island.
- if (jumpIsland == 0) {
- barf("%s: unconditional relative branch out of range: "
- "no jump island available: %#lx",
- OC_INFORMATIVE_FILENAME(oc),
- word);
- }
-
- word = offsetToJumpIsland;
-
- if((word & 0xFE000000) != 0xFE000000 &&
- (word & 0xFE000000) != 0x00000000) {
- barf("%s: unconditional relative branch out of range: "
- "jump island out of range: %#lx",
- OC_INFORMATIVE_FILENAME(oc),
- word);
- }
- }
- *wordPtr = (*wordPtr & 0xFC000003) | (word & 0x03FFFFFC);
- continue;
- }
-#endif /* powerpc_HOST_ARCH */
}
else
{
@@ -1822,10 +1613,6 @@ ocResolve_MachO(ObjectCode* oc)
return 0;
#endif
-#if defined (powerpc_HOST_ARCH)
- ocFlushInstructionCache( oc );
-#endif
-
return 1;
}
@@ -1865,53 +1652,6 @@ ocRunInit_MachO ( ObjectCode *oc )
return 1;
}
-#if defined(powerpc_HOST_ARCH)
-/*
- * The Mach-O object format uses leading underscores. But not everywhere.
- * There is a small number of runtime support functions defined in
- * libcc_dynamic.a whose name does not have a leading underscore.
- * As a consequence, we can't get their address from C code.
- * We have to use inline assembler just to take the address of a function.
- * Yuck.
- */
-
-extern void* symbolsWithoutUnderscore[];
-
-void
-machoInitSymbolsWithoutUnderscore(void)
-{
- void **p = symbolsWithoutUnderscore;
- __asm__ volatile(".globl _symbolsWithoutUnderscore\n.data\n_symbolsWithoutUnderscore:");
-
-#undef SymI_NeedsProto
-#undef SymI_NeedsDataProto
-
-#define SymI_NeedsProto(x) \
- __asm__ volatile(".long " # x);
-
-#define SymI_NeedsDataProto(x) \
- SymI_NeedsProto(x)
-
- RTS_MACHO_NOUNDERLINE_SYMBOLS
-
- __asm__ volatile(".text");
-
-#undef SymI_NeedsProto
-#undef SymI_NeedsDataProto
-
-#define SymI_NeedsProto(x) \
- ghciInsertSymbolTable("(GHCi built-in symbols)", symhash, #x, *p++, HS_BOOL_FALSE, NULL);
-
-#define SymI_NeedsDataProto(x) \
- SymI_NeedsProto(x)
-
- RTS_MACHO_NOUNDERLINE_SYMBOLS
-
-#undef SymI_NeedsProto
-#undef SymI_NeedsDataProto
-}
-#endif
-
/*
* Figure out by how much to shift the entire Mach-O file in memory
* when loading so that its single segment ends up 16-byte-aligned
@@ -1930,8 +1670,7 @@ machoGetMisalignment( FILE * f )
}
fseek(f, -sizeof(header), SEEK_CUR);
-#if defined(x86_64_HOST_ARCH) || defined(powerpc64_HOST_ARCH) \
- || defined(aarch64_HOST_ARCH)
+#if defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
if(header.magic != MH_MAGIC_64) {
barf("Bad magic. Expected: %08x, got: %08x.",
MH_MAGIC_64, header.magic);
diff --git a/rts/linker/MachOTypes.h b/rts/linker/MachOTypes.h
index 4176c4890f..dcea906021 100644
--- a/rts/linker/MachOTypes.h
+++ b/rts/linker/MachOTypes.h
@@ -6,14 +6,13 @@
#include <mach-o/loader.h>
-#if defined(x86_64_HOST_ARCH) || defined(powerpc64_HOST_ARCH) \
+#if defined(x86_64_HOST_ARCH) \
|| defined(aarch64_HOST_ARCH) || defined(arm64_HOST_ARCH)
typedef struct mach_header_64 MachOHeader;
typedef struct segment_command_64 MachOSegmentCommand;
typedef struct section_64 MachOSection;
typedef struct nlist_64 MachONList;
-#elif defined(i386_HOST_ARCH) || defined(powerpc_HOST_ARCH) \
- || defined(arm_HOST_ARCH)
+#elif defined(i386_HOST_ARCH) || defined(arm_HOST_ARCH)
typedef struct mach_header MachOHeader;
typedef struct segment_command MachOSegmentCommand;
typedef struct section MachOSection;