static int ocGetNames_MachO ( ObjectCode* oc );
static int ocResolve_MachO ( ObjectCode* oc );
+#ifndef USE_MMAP
static int machoGetMisalignment( FILE * );
+#endif
#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH)
static int ocAllocateSymbolExtras_MachO ( ObjectCode* oc );
#endif
# if defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO)
-static char *
+static const char *
internal_dlopen(const char *dll_name)
{
void *hdl;
- char *errmsg, *errmsg_copy;
+ const char *errmsg;
+ char *errmsg_copy;
// omitted: RTLD_NOW
// see http://www.haskell.org/pipermail/cvs-ghc/2007-September/038570.html
#define NMATCH 5
regmatch_t match[NMATCH];
- char *errmsg;
+ const char *errmsg;
FILE* fp;
size_t match_length;
#define MAXLINE 1000
thing += value;
break;
case X86_64_RELOC_SIGNED:
+ case X86_64_RELOC_SIGNED_1:
+ case X86_64_RELOC_SIGNED_2:
+ case X86_64_RELOC_SIGNED_4:
ASSERT(reloc->r_pcrel);
thing += value - baseValue;
break;
}
#endif
+#ifndef USE_MMAP
/*
* 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
return misalignment ? (16 - misalignment) : 0;
}
+#endif
#endif