diff options
Diffstat (limited to 'rts/linker')
-rw-r--r-- | rts/linker/MachO.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c index e09d151c14..9f2cb0edba 100644 --- a/rts/linker/MachO.c +++ b/rts/linker/MachO.c @@ -250,7 +250,8 @@ ocVerifyImage_MachO(ObjectCode * oc) IF_DEBUG(linker, debugBelch("ocVerifyImage_MachO: start\n")); -#if x86_64_HOST_ARCH || powerpc64_HOST_ARCH || aarch64_HOST_ARCH +#if defined(x86_64_HOST_ARCH) || defined(powerpc64_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", @@ -283,7 +284,7 @@ resolveImports( IF_DEBUG(linker, debugBelch("resolveImports: start\n")); -#if i386_HOST_ARCH +#if defined(i386_HOST_ARCH) int isJumpTable = 0; if (strcmp(sect->sectname,"__jump_table") == 0) { @@ -321,7 +322,7 @@ resolveImports( } ASSERT(addr); -#if i386_HOST_ARCH +#if defined(i386_HOST_ARCH) if (isJumpTable) { checkProddableBlock(oc,oc->image + sect->offset + i*itemSize, 5); @@ -1924,7 +1925,8 @@ machoGetMisalignment( FILE * f ) } fseek(f, -sizeof(header), SEEK_CUR); -#if x86_64_HOST_ARCH || powerpc64_HOST_ARCH || aarch64_HOST_ARCH +#if defined(x86_64_HOST_ARCH) || defined(powerpc64_HOST_ARCH) \ + || defined(aarch64_HOST_ARCH) if(header.magic != MH_MAGIC_64) { barf("Bad magic. Expected: %08x, got: %08x.", MH_MAGIC_64, header.magic); |