/rts/Linker.c
C | 6556 lines | 5063 code | 687 blank | 806 comment | 964 complexity | e8907cc17e82ad8e0a73e6a5b6e91f69 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- /* -----------------------------------------------------------------------------
- *
- * (c) The GHC Team, 2000-2012
- *
- * RTS Object Linker
- *
- * ---------------------------------------------------------------------------*/
- #if 0
- #include "PosixSource.h"
- #endif
- /* Linux needs _GNU_SOURCE to get RTLD_DEFAULT from <dlfcn.h> and
- MREMAP_MAYMOVE from <sys/mman.h>.
- */
- #if defined(__linux__) || defined(__GLIBC__)
- #define _GNU_SOURCE 1
- #endif
- #include "Rts.h"
- #include "HsFFI.h"
- #include "sm/Storage.h"
- #include "Stats.h"
- #include "Hash.h"
- #include "LinkerInternals.h"
- #include "RtsUtils.h"
- #include "Trace.h"
- #include "StgPrimFloat.h" // for __int_encodeFloat etc.
- #include "Stable.h"
- #include "Proftimer.h"
- #if !defined(mingw32_HOST_OS)
- #include "posix/Signals.h"
- #endif
- // get protos for is*()
- #include <ctype.h>
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #include <inttypes.h>
- #include <stdlib.h>
- #include <string.h>
- #include <stdio.h>
- #include <assert.h>
- #ifdef HAVE_SYS_STAT_H
- #include <sys/stat.h>
- #endif
- #if defined(HAVE_DLFCN_H)
- #include <dlfcn.h>
- #endif
- #if defined(cygwin32_HOST_OS)
- #ifdef HAVE_DIRENT_H
- #include <dirent.h>
- #endif
- #ifdef HAVE_SYS_TIME_H
- #include <sys/time.h>
- #endif
- #include <regex.h>
- #include <sys/fcntl.h>
- #include <sys/termios.h>
- #include <sys/utime.h>
- #include <sys/utsname.h>
- #include <sys/wait.h>
- #endif
- #if (defined(powerpc_HOST_ARCH) && defined(linux_HOST_OS)) \
- || (!defined(powerpc_HOST_ARCH) && \
- ( defined(linux_HOST_OS) || defined(freebsd_HOST_OS) || \
- defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
- defined(openbsd_HOST_OS ) || defined(darwin_HOST_OS ) || \
- defined(kfreebsdgnu_HOST_OS) || defined(gnu_HOST_OS)))
- /* Don't use mmap on powerpc_HOST_ARCH as mmap doesn't support
- * reallocating but we need to allocate jump islands just after each
- * object images. Otherwise relative branches to jump islands can fail
- * due to 24-bits displacement overflow.
- */
- #define USE_MMAP
- #include <fcntl.h>
- #include <sys/mman.h>
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- #endif
- /* PowerPC has relative branch instructions with only 24 bit displacements
- * and therefore needs jump islands contiguous with each object code module.
- */
- #if (defined(USE_MMAP) && defined(powerpc_HOST_ARCH) && defined(linux_HOST_OS))
- #define USE_CONTIGUOUS_MMAP 1
- #else
- #define USE_CONTIGUOUS_MMAP 0
- #endif
- #if defined(linux_HOST_OS) || defined(solaris2_HOST_OS) || defined(freebsd_HOST_OS) || defined(kfreebsdgnu_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(openbsd_HOST_OS) || defined(gnu_HOST_OS)
- # define OBJFORMAT_ELF
- # include <regex.h> // regex is already used by dlopen() so this is OK
- // to use here without requiring an additional lib
- #elif defined(cygwin32_HOST_OS) || defined (mingw32_HOST_OS)
- # define OBJFORMAT_PEi386
- # include <windows.h>
- # include <math.h>
- #elif defined(darwin_HOST_OS)
- # define OBJFORMAT_MACHO
- # include <regex.h>
- # include <mach/machine.h>
- # include <mach-o/fat.h>
- # include <mach-o/loader.h>
- # include <mach-o/nlist.h>
- # include <mach-o/reloc.h>
- #if !defined(HAVE_DLFCN_H)
- # include <mach-o/dyld.h>
- #endif
- #if defined(powerpc_HOST_ARCH)
- # include <mach-o/ppc/reloc.h>
- #endif
- #if defined(x86_64_HOST_ARCH)
- # include <mach-o/x86_64/reloc.h>
- #endif
- #endif
- #if defined(x86_64_HOST_ARCH) && defined(darwin_HOST_OS)
- #define ALWAYS_PIC
- #endif
- #if defined(dragonfly_HOST_OS)
- #include <sys/tls.h>
- #endif
- // Defining this as 'int' rather than 'const int' means that we don't get
- // warnings like
- // error: function might be possible candidate for attribute ‘noreturn’
- // from gcc:
- #ifdef DYNAMIC_BY_DEFAULT
- int dynamicByDefault = 1;
- #else
- int dynamicByDefault = 0;
- #endif
- /* Hash table mapping symbol names to Symbol */
- static /*Str*/HashTable *symhash;
- /* Hash table mapping symbol names to StgStablePtr */
- static /*Str*/HashTable *stablehash;
- /* List of currently loaded objects */
- ObjectCode *objects = NULL; /* initially empty */
- static HsInt loadOc( ObjectCode* oc );
- static ObjectCode* mkOc( pathchar *path, char *image, int imageSize,
- char *archiveMemberName
- #ifndef USE_MMAP
- #ifdef darwin_HOST_OS
- , int misalignment
- #endif
- #endif
- );
- // Use wchar_t for pathnames on Windows (#5697)
- #if defined(mingw32_HOST_OS)
- #define pathcmp wcscmp
- #define pathlen wcslen
- #define pathopen _wfopen
- #define pathstat _wstat
- #define struct_stat struct _stat
- #define open wopen
- #define WSTR(s) L##s
- #define PATH_FMT "S"
- #else
- #define pathcmp strcmp
- #define pathlen strlen
- #define pathopen fopen
- #define pathstat stat
- #define struct_stat struct stat
- #define WSTR(s) s
- #define PATH_FMT "s"
- #endif
- static pathchar* pathdup(pathchar *path)
- {
- pathchar *ret;
- #if defined(mingw32_HOST_OS)
- ret = wcsdup(path);
- #else
- /* sigh, strdup() isn't a POSIX function, so do it the long way */
- ret = stgMallocBytes( strlen(path)+1, "loadObj" );
- strcpy(ret, path);
- #endif
- return ret;
- }
- #if defined(OBJFORMAT_ELF)
- static int ocVerifyImage_ELF ( ObjectCode* oc );
- static int ocGetNames_ELF ( ObjectCode* oc );
- static int ocResolve_ELF ( ObjectCode* oc );
- #if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) || defined(arm_HOST_ARCH)
- static int ocAllocateSymbolExtras_ELF ( ObjectCode* oc );
- #endif
- #elif defined(OBJFORMAT_PEi386)
- static int ocVerifyImage_PEi386 ( ObjectCode* oc );
- static int ocGetNames_PEi386 ( ObjectCode* oc );
- static int ocResolve_PEi386 ( ObjectCode* oc );
- static void *lookupSymbolInDLLs ( unsigned char *lbl );
- static void zapTrailingAtSign ( unsigned char *sym );
- #elif defined(OBJFORMAT_MACHO)
- static int ocVerifyImage_MachO ( ObjectCode* oc );
- 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
- #ifdef powerpc_HOST_ARCH
- static void machoInitSymbolsWithoutUnderscore( void );
- #endif
- #endif
- /* on x86_64 we have a problem with relocating symbol references in
- * code that was compiled without -fPIC. By default, the small memory
- * model is used, which assumes that symbol references can fit in a
- * 32-bit slot. The system dynamic linker makes this work for
- * references to shared libraries by either (a) allocating a jump
- * table slot for code references, or (b) moving the symbol at load
- * time (and copying its contents, if necessary) for data references.
- *
- * We unfortunately can't tell whether symbol references are to code
- * or data. So for now we assume they are code (the vast majority
- * are), and allocate jump-table slots. Unfortunately this will
- * SILENTLY generate crashing code for data references. This hack is
- * enabled by X86_64_ELF_NONPIC_HACK.
- *
- * One workaround is to use shared Haskell libraries. This is
- * coming. Another workaround is to keep the static libraries but
- * compile them with -fPIC, because that will generate PIC references
- * to data which can be relocated. The PIC code is still too green to
- * do this systematically, though.
- *
- * See bug #781
- * See thread http://www.haskell.org/pipermail/cvs-ghc/2007-September/038458.html
- *
- * Naming Scheme for Symbol Macros
- *
- * SymI_*: symbol is internal to the RTS. It resides in an object
- * file/library that is statically.
- * SymE_*: symbol is external to the RTS library. It might be linked
- * dynamically.
- *
- * Sym*_HasProto : the symbol prototype is imported in an include file
- * or defined explicitly
- * Sym*_NeedsProto: the symbol is undefined and we add a dummy
- * default proto extern void sym(void);
- */
- #define X86_64_ELF_NONPIC_HACK 1
- /* Link objects into the lower 2Gb on x86_64. GHC assumes the
- * small memory model on this architecture (see gcc docs,
- * -mcmodel=small).
- *
- * MAP_32BIT not available on OpenBSD/amd64
- */
- #if defined(x86_64_HOST_ARCH) && defined(MAP_32BIT)
- #define TRY_MAP_32BIT MAP_32BIT
- #else
- #define TRY_MAP_32BIT 0
- #endif
- /*
- * Due to the small memory model (see above), on x86_64 we have to map
- * all our non-PIC object files into the low 2Gb of the address space
- * (why 2Gb and not 4Gb? Because all addresses must be reachable
- * using a 32-bit signed PC-relative offset). On Linux we can do this
- * using the MAP_32BIT flag to mmap(), however on other OSs
- * (e.g. *BSD, see #2063, and also on Linux inside Xen, see #2512), we
- * can't do this. So on these systems, we have to pick a base address
- * in the low 2Gb of the address space and try to allocate memory from
- * there.
- *
- * We pick a default address based on the OS, but also make this
- * configurable via an RTS flag (+RTS -xm)
- */
- #if !defined(ALWAYS_PIC) && defined(x86_64_HOST_ARCH)
- #if defined(MAP_32BIT)
- // Try to use MAP_32BIT
- #define MMAP_32BIT_BASE_DEFAULT 0
- #else
- // A guess: 1Gb.
- #define MMAP_32BIT_BASE_DEFAULT 0x40000000
- #endif
- static void *mmap_32bit_base = (void *)MMAP_32BIT_BASE_DEFAULT;
- #endif
- /* MAP_ANONYMOUS is MAP_ANON on some systems, e.g. OpenBSD */
- #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
- #define MAP_ANONYMOUS MAP_ANON
- #endif
- /* -----------------------------------------------------------------------------
- * Built-in symbols from the RTS
- */
- typedef struct _RtsSymbolVal {
- char *lbl;
- void *addr;
- } RtsSymbolVal;
- #define Maybe_Stable_Names SymI_HasProto(stg_mkWeakzh) \
- SymI_HasProto(stg_mkWeakNoFinalizzerzh) \
- SymI_HasProto(stg_mkWeakForeignEnvzh) \
- SymI_HasProto(stg_makeStableNamezh) \
- SymI_HasProto(stg_finalizzeWeakzh)
- #if !defined (mingw32_HOST_OS)
- #define RTS_POSIX_ONLY_SYMBOLS \
- SymI_HasProto(__hscore_get_saved_termios) \
- SymI_HasProto(__hscore_set_saved_termios) \
- SymI_HasProto(shutdownHaskellAndSignal) \
- SymI_HasProto(signal_handlers) \
- SymI_HasProto(stg_sig_install) \
- SymI_HasProto(rtsTimerSignal) \
- SymI_HasProto(atexit) \
- SymI_NeedsProto(nocldstop)
- #endif
- #if defined (cygwin32_HOST_OS)
- #define RTS_MINGW_ONLY_SYMBOLS /**/
- /* Don't have the ability to read import libs / archives, so
- * we have to stupidly list a lot of what libcygwin.a
- * exports; sigh.
- */
- #define RTS_CYGWIN_ONLY_SYMBOLS \
- SymI_HasProto(regfree) \
- SymI_HasProto(regexec) \
- SymI_HasProto(regerror) \
- SymI_HasProto(regcomp) \
- SymI_HasProto(__errno) \
- SymI_HasProto(access) \
- SymI_HasProto(chmod) \
- SymI_HasProto(chdir) \
- SymI_HasProto(close) \
- SymI_HasProto(creat) \
- SymI_HasProto(dup) \
- SymI_HasProto(dup2) \
- SymI_HasProto(fstat) \
- SymI_HasProto(fcntl) \
- SymI_HasProto(getcwd) \
- SymI_HasProto(getenv) \
- SymI_HasProto(lseek) \
- SymI_HasProto(open) \
- SymI_HasProto(fpathconf) \
- SymI_HasProto(pathconf) \
- SymI_HasProto(stat) \
- SymI_HasProto(pow) \
- SymI_HasProto(tanh) \
- SymI_HasProto(cosh) \
- SymI_HasProto(sinh) \
- SymI_HasProto(atan) \
- SymI_HasProto(acos) \
- SymI_HasProto(asin) \
- SymI_HasProto(tan) \
- SymI_HasProto(cos) \
- SymI_HasProto(sin) \
- SymI_HasProto(exp) \
- SymI_HasProto(log) \
- SymI_HasProto(sqrt) \
- SymI_HasProto(localtime_r) \
- SymI_HasProto(gmtime_r) \
- SymI_HasProto(mktime) \
- SymI_NeedsProto(_imp___tzname) \
- SymI_HasProto(gettimeofday) \
- SymI_HasProto(timezone) \
- SymI_HasProto(tcgetattr) \
- SymI_HasProto(tcsetattr) \
- SymI_HasProto(memcpy) \
- SymI_HasProto(memmove) \
- SymI_HasProto(realloc) \
- SymI_HasProto(malloc) \
- SymI_HasProto(free) \
- SymI_HasProto(fork) \
- SymI_HasProto(lstat) \
- SymI_HasProto(isatty) \
- SymI_HasProto(mkdir) \
- SymI_HasProto(opendir) \
- SymI_HasProto(readdir) \
- SymI_HasProto(rewinddir) \
- SymI_HasProto(closedir) \
- SymI_HasProto(link) \
- SymI_HasProto(mkfifo) \
- SymI_HasProto(pipe) \
- SymI_HasProto(read) \
- SymI_HasProto(rename) \
- SymI_HasProto(rmdir) \
- SymI_HasProto(select) \
- SymI_HasProto(system) \
- SymI_HasProto(write) \
- SymI_HasProto(strcmp) \
- SymI_HasProto(strcpy) \
- SymI_HasProto(strncpy) \
- SymI_HasProto(strerror) \
- SymI_HasProto(sigaddset) \
- SymI_HasProto(sigemptyset) \
- SymI_HasProto(sigprocmask) \
- SymI_HasProto(umask) \
- SymI_HasProto(uname) \
- SymI_HasProto(unlink) \
- SymI_HasProto(utime) \
- SymI_HasProto(waitpid)
- #elif defined(mingw32_HOST_OS)
- #define RTS_POSIX_ONLY_SYMBOLS /**/
- #define RTS_CYGWIN_ONLY_SYMBOLS /**/
- #if HAVE_GETTIMEOFDAY
- #define RTS_MINGW_GETTIMEOFDAY_SYM SymI_NeedsProto(gettimeofday)
- #else
- #define RTS_MINGW_GETTIMEOFDAY_SYM /**/
- #endif
- #if HAVE___MINGW_VFPRINTF
- #define RTS___MINGW_VFPRINTF_SYM SymI_HasProto(__mingw_vfprintf)
- #else
- #define RTS___MINGW_VFPRINTF_SYM /**/
- #endif
- #if defined(i386_HOST_ARCH)
- #define RTS_WIN32_ONLY(X) X
- #else
- #define RTS_WIN32_ONLY(X) /**/
- #endif
- #if defined(x86_64_HOST_ARCH)
- #define RTS_WIN64_ONLY(X) X
- #else
- #define RTS_WIN64_ONLY(X) /**/
- #endif
- /* These are statically linked from the mingw libraries into the ghc
- executable, so we have to employ this hack. */
- #define RTS_MINGW_ONLY_SYMBOLS \
- SymI_HasProto(stg_asyncReadzh) \
- SymI_HasProto(stg_asyncWritezh) \
- SymI_HasProto(stg_asyncDoProczh) \
- SymI_HasProto(getWin32ProgArgv) \
- SymI_HasProto(setWin32ProgArgv) \
- SymI_HasProto(memset) \
- SymI_HasProto(inet_ntoa) \
- SymI_HasProto(inet_addr) \
- SymI_HasProto(htonl) \
- SymI_HasProto(recvfrom) \
- SymI_HasProto(listen) \
- SymI_HasProto(bind) \
- SymI_HasProto(shutdown) \
- SymI_HasProto(connect) \
- SymI_HasProto(htons) \
- SymI_HasProto(ntohs) \
- SymI_HasProto(getservbyname) \
- SymI_HasProto(getservbyport) \
- SymI_HasProto(getprotobynumber) \
- SymI_HasProto(getprotobyname) \
- SymI_HasProto(gethostbyname) \
- SymI_HasProto(gethostbyaddr) \
- SymI_HasProto(gethostname) \
- SymI_HasProto(strcpy) \
- SymI_HasProto(strncpy) \
- SymI_HasProto(abort) \
- RTS_WIN32_ONLY(SymI_NeedsProto(_alloca)) \
- SymI_HasProto(isxdigit) \
- SymI_HasProto(isupper) \
- SymI_HasProto(ispunct) \
- SymI_HasProto(islower) \
- SymI_HasProto(isspace) \
- SymI_HasProto(isprint) \
- SymI_HasProto(isdigit) \
- SymI_HasProto(iscntrl) \
- SymI_HasProto(isalpha) \
- SymI_HasProto(isalnum) \
- SymI_HasProto(isascii) \
- RTS___MINGW_VFPRINTF_SYM \
- SymI_HasProto(strcmp) \
- SymI_HasProto(memmove) \
- SymI_HasProto(realloc) \
- SymI_HasProto(malloc) \
- SymI_HasProto(pow) \
- SymI_HasProto(tanh) \
- SymI_HasProto(cosh) \
- SymI_HasProto(sinh) \
- SymI_HasProto(atan) \
- SymI_HasProto(acos) \
- SymI_HasProto(asin) \
- SymI_HasProto(tan) \
- SymI_HasProto(cos) \
- SymI_HasProto(sin) \
- SymI_HasProto(exp) \
- SymI_HasProto(log) \
- SymI_HasProto(sqrt) \
- SymI_HasProto(powf) \
- SymI_HasProto(tanhf) \
- SymI_HasProto(coshf) \
- SymI_HasProto(sinhf) \
- SymI_HasProto(atanf) \
- SymI_HasProto(acosf) \
- SymI_HasProto(asinf) \
- SymI_HasProto(tanf) \
- SymI_HasProto(cosf) \
- SymI_HasProto(sinf) \
- SymI_HasProto(expf) \
- SymI_HasProto(logf) \
- SymI_HasProto(sqrtf) \
- SymI_HasProto(erf) \
- SymI_HasProto(erfc) \
- SymI_HasProto(erff) \
- SymI_HasProto(erfcf) \
- SymI_HasProto(memcpy) \
- SymI_HasProto(rts_InstallConsoleEvent) \
- SymI_HasProto(rts_ConsoleHandlerDone) \
- SymI_NeedsProto(mktime) \
- RTS_WIN32_ONLY(SymI_NeedsProto(_imp___timezone)) \
- RTS_WIN32_ONLY(SymI_NeedsProto(_imp___tzname)) \
- RTS_WIN32_ONLY(SymI_NeedsProto(_imp__tzname)) \
- RTS_WIN32_ONLY(SymI_NeedsProto(_imp___iob)) \
- RTS_WIN32_ONLY(SymI_NeedsProto(_imp___osver)) \
- SymI_NeedsProto(localtime) \
- SymI_NeedsProto(gmtime) \
- SymI_NeedsProto(opendir) \
- SymI_NeedsProto(readdir) \
- SymI_NeedsProto(rewinddir) \
- RTS_WIN32_ONLY(SymI_NeedsProto(_imp____mb_cur_max)) \
- RTS_WIN32_ONLY(SymI_NeedsProto(_imp___pctype)) \
- RTS_WIN32_ONLY(SymI_NeedsProto(__chkstk)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp___iob_func)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(___chkstk_ms)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_localeconv)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_islower)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_isspace)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_isxdigit)) \
- RTS_WIN64_ONLY(SymI_HasProto(close)) \
- RTS_WIN64_ONLY(SymI_HasProto(read)) \
- RTS_WIN64_ONLY(SymI_HasProto(dup)) \
- RTS_WIN64_ONLY(SymI_HasProto(dup2)) \
- RTS_WIN64_ONLY(SymI_HasProto(write)) \
- SymI_NeedsProto(getpid) \
- RTS_WIN64_ONLY(SymI_HasProto(access)) \
- SymI_HasProto(chmod) \
- RTS_WIN64_ONLY(SymI_HasProto(creat)) \
- RTS_WIN64_ONLY(SymI_HasProto(umask)) \
- SymI_HasProto(unlink) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__errno)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(ftruncate64)) \
- RTS_WIN64_ONLY(SymI_HasProto(setmode)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__wstat64)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__fstat64)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__wsopen)) \
- RTS_WIN64_ONLY(SymI_HasProto(__imp__environ)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetFileAttributesA)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetFileInformationByHandle)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetFileType)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetLastError)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_QueryPerformanceFrequency)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_QueryPerformanceCounter)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetTickCount)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_WaitForSingleObject)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_PeekConsoleInputA)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_ReadConsoleInputA)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_PeekNamedPipe)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__isatty)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_select)) \
- RTS_WIN64_ONLY(SymI_HasProto(isatty)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__get_osfhandle)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetConsoleMode)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_SetConsoleMode)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_FlushConsoleInputBuffer)) \
- RTS_WIN64_ONLY(SymI_HasProto(free)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(raise)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(_getpid)) \
- RTS_WIN64_ONLY(SymI_HasProto(getc)) \
- RTS_WIN64_ONLY(SymI_HasProto(ungetc)) \
- RTS_WIN64_ONLY(SymI_HasProto(puts)) \
- RTS_WIN64_ONLY(SymI_HasProto(putc)) \
- RTS_WIN64_ONLY(SymI_HasProto(putchar)) \
- RTS_WIN64_ONLY(SymI_HasProto(fputc)) \
- RTS_WIN64_ONLY(SymI_HasProto(fread)) \
- RTS_WIN64_ONLY(SymI_HasProto(fwrite)) \
- RTS_WIN64_ONLY(SymI_HasProto(ferror)) \
- RTS_WIN64_ONLY(SymI_HasProto(printf)) \
- RTS_WIN64_ONLY(SymI_HasProto(fprintf)) \
- RTS_WIN64_ONLY(SymI_HasProto(sprintf)) \
- RTS_WIN64_ONLY(SymI_HasProto(vsprintf)) \
- RTS_WIN64_ONLY(SymI_HasProto(sscanf)) \
- RTS_WIN64_ONLY(SymI_HasProto(ldexp)) \
- RTS_WIN64_ONLY(SymI_HasProto(strlen)) \
- RTS_WIN64_ONLY(SymI_HasProto(strnlen)) \
- RTS_WIN64_ONLY(SymI_HasProto(strchr)) \
- RTS_WIN64_ONLY(SymI_HasProto(strtol)) \
- RTS_WIN64_ONLY(SymI_HasProto(strerror)) \
- RTS_WIN64_ONLY(SymI_HasProto(memchr)) \
- RTS_WIN64_ONLY(SymI_HasProto(memcmp)) \
- RTS_WIN64_ONLY(SymI_HasProto(wcscpy)) \
- RTS_WIN64_ONLY(SymI_HasProto(wcslen)) \
- RTS_WIN64_ONLY(SymI_HasProto(_lseeki64)) \
- RTS_WIN64_ONLY(SymI_HasProto(_wchmod)) \
- RTS_WIN64_ONLY(SymI_HasProto(closesocket)) \
- RTS_WIN64_ONLY(SymI_HasProto(send)) \
- RTS_WIN64_ONLY(SymI_HasProto(recv)) \
- RTS_WIN64_ONLY(SymI_HasProto(bsearch)) \
- RTS_WIN64_ONLY(SymI_HasProto(CommandLineToArgvW)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateBitmap)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateBitmapIndirect)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateCompatibleBitmap)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateDIBPatternBrushPt)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateDIBitmap)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetBitmapDimensionEx)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetBitmapDimensionEx)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetStockObject)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetObjectW)) \
- RTS_WIN64_ONLY(SymI_HasProto(DeleteObject)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetDIBits)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetDIBits)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateSolidBrush)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateHatchBrush)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreatePatternBrush)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateFontW)) \
- RTS_WIN64_ONLY(SymI_HasProto(AngleArc)) \
- RTS_WIN64_ONLY(SymI_HasProto(Arc)) \
- RTS_WIN64_ONLY(SymI_HasProto(ArcTo)) \
- RTS_WIN64_ONLY(SymI_HasProto(BeginPath)) \
- RTS_WIN64_ONLY(SymI_HasProto(BitBlt)) \
- RTS_WIN64_ONLY(SymI_HasProto(CancelDC)) \
- RTS_WIN64_ONLY(SymI_HasProto(Chord)) \
- RTS_WIN64_ONLY(SymI_HasProto(CloseFigure)) \
- RTS_WIN64_ONLY(SymI_HasProto(CombineRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateCompatibleDC)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateEllipticRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateEllipticRgnIndirect)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreatePen)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreatePolygonRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateRectRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateRectRgnIndirect)) \
- RTS_WIN64_ONLY(SymI_HasProto(CreateRoundRectRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(DeleteDC)) \
- RTS_WIN64_ONLY(SymI_HasProto(Ellipse)) \
- RTS_WIN64_ONLY(SymI_HasProto(EndPath)) \
- RTS_WIN64_ONLY(SymI_HasProto(EqualRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(ExtSelectClipRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(FillPath)) \
- RTS_WIN64_ONLY(SymI_HasProto(FillRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(FlattenPath)) \
- RTS_WIN64_ONLY(SymI_HasProto(FrameRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetArcDirection)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetBkColor)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetBkMode)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetBrushOrgEx)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetCurrentObject)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetDCOrgEx)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetGraphicsMode)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetMiterLimit)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetPolyFillMode)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetRgnBox)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetStretchBltMode)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetTextAlign)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetTextCharacterExtra)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetTextColor)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetTextExtentPoint32W)) \
- RTS_WIN64_ONLY(SymI_HasProto(InvertRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(LineTo)) \
- RTS_WIN64_ONLY(SymI_HasProto(MaskBlt)) \
- RTS_WIN64_ONLY(SymI_HasProto(MoveToEx)) \
- RTS_WIN64_ONLY(SymI_HasProto(OffsetRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(PaintRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(PathToRegion)) \
- RTS_WIN64_ONLY(SymI_HasProto(Pie)) \
- RTS_WIN64_ONLY(SymI_HasProto(PlgBlt)) \
- RTS_WIN64_ONLY(SymI_HasProto(PolyBezier)) \
- RTS_WIN64_ONLY(SymI_HasProto(PolyBezierTo)) \
- RTS_WIN64_ONLY(SymI_HasProto(Polygon)) \
- RTS_WIN64_ONLY(SymI_HasProto(Polyline)) \
- RTS_WIN64_ONLY(SymI_HasProto(PolylineTo)) \
- RTS_WIN64_ONLY(SymI_HasProto(PtInRegion)) \
- RTS_WIN64_ONLY(SymI_HasProto(Rectangle)) \
- RTS_WIN64_ONLY(SymI_HasProto(RectInRegion)) \
- RTS_WIN64_ONLY(SymI_HasProto(RestoreDC)) \
- RTS_WIN64_ONLY(SymI_HasProto(RoundRect)) \
- RTS_WIN64_ONLY(SymI_HasProto(SaveDC)) \
- RTS_WIN64_ONLY(SymI_HasProto(SelectClipPath)) \
- RTS_WIN64_ONLY(SymI_HasProto(SelectClipRgn)) \
- RTS_WIN64_ONLY(SymI_HasProto(SelectObject)) \
- RTS_WIN64_ONLY(SymI_HasProto(SelectPalette)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetArcDirection)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetBkColor)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetBkMode)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetBrushOrgEx)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetGraphicsMode)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetMiterLimit)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetPolyFillMode)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetStretchBltMode)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetTextAlign)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetTextCharacterExtra)) \
- RTS_WIN64_ONLY(SymI_HasProto(SetTextColor)) \
- RTS_WIN64_ONLY(SymI_HasProto(StretchBlt)) \
- RTS_WIN64_ONLY(SymI_HasProto(StrokeAndFillPath)) \
- RTS_WIN64_ONLY(SymI_HasProto(StrokePath)) \
- RTS_WIN64_ONLY(SymI_HasProto(TextOutW)) \
- RTS_WIN64_ONLY(SymI_HasProto(timeGetTime)) \
- RTS_WIN64_ONLY(SymI_HasProto(WidenPath)) \
- RTS_WIN64_ONLY(SymI_HasProto(GetFileSecurityW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegCloseKey)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegConnectRegistryW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegCreateKeyExW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegCreateKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegDeleteKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegDeleteValueW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegEnumKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegEnumValueW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegFlushKey)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegLoadKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegNotifyChangeKeyValue)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegOpenKeyExW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegOpenKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegQueryInfoKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegQueryValueExW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegQueryValueW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegReplaceKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegRestoreKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegSaveKeyW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegSetValueExW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegSetValueW)) \
- RTS_WIN64_ONLY(SymI_HasProto(RegUnLoadKeyW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(SHGetFolderPathW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_SetWindowLongPtrW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetWindowLongPtrW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_MenuItemFromPoint)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_ChildWindowFromPoint)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_ChildWindowFromPointEx)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_DeleteObject)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_UnmapViewOfFile)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_CloseHandle)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_FreeLibrary)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetMessageW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_TranslateMessage)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_DispatchMessageW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_DefWindowProcW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetDIBits)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GlobalAlloc)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GlobalFree)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_CreateFileW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_WriteFile)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_CreateCompatibleBitmap)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_SelectObject)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_Polygon)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_FormatMessageW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__localtime64)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__tzname)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__timezone)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_CreatePipe)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_SetHandleInformation)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetStdHandle)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetCurrentProcess)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_DuplicateHandle)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_CreateProcessW)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_TerminateProcess)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp__open_osfhandle)) \
- RTS_WIN64_ONLY(SymI_NeedsProto(__imp_GetExitCodeProcess)) \
- RTS_MINGW_GETTIMEOFDAY_SYM \
- SymI_NeedsProto(closedir)
- #else
- #define RTS_MINGW_ONLY_SYMBOLS /**/
- #define RTS_CYGWIN_ONLY_SYMBOLS /**/
- #endif
- #if defined(darwin_HOST_OS) && HAVE_PRINTF_LDBLSTUB
- #define RTS_DARWIN_ONLY_SYMBOLS \
- SymI_NeedsProto(asprintf$LDBLStub) \
- SymI_NeedsProto(err$LDBLStub) \
- SymI_NeedsProto(errc$LDBLStub) \
- SymI_NeedsProto(errx$LDBLStub) \
- SymI_NeedsProto(fprintf$LDBLStub) \
- SymI_NeedsProto(fscanf$LDBLStub) \
- SymI_NeedsProto(fwprintf$LDBLStub) \
- SymI_NeedsProto(fwscanf$LDBLStub) \
- SymI_NeedsProto(printf$LDBLStub) \
- SymI_NeedsProto(scanf$LDBLStub) \
- SymI_NeedsProto(snprintf$LDBLStub) \
- SymI_NeedsProto(sprintf$LDBLStub) \
- SymI_NeedsProto(sscanf$LDBLStub) \
- SymI_NeedsProto(strtold$LDBLStub) \
- SymI_NeedsProto(swprintf$LDBLStub) \
- SymI_NeedsProto(swscanf$LDBLStub) \
- SymI_NeedsProto(syslog$LDBLStub) \
- SymI_NeedsProto(vasprintf$LDBLStub) \
- SymI_NeedsProto(verr$LDBLStub) \
- SymI_NeedsProto(verrc$LDBLStub) \
- SymI_NeedsProto(verrx$LDBLStub) \
- SymI_NeedsProto(vfprintf$LDBLStub) \
- SymI_NeedsProto(vfscanf$LDBLStub) \
- SymI_NeedsProto(vfwprintf$LDBLStub) \
- SymI_NeedsProto(vfwscanf$LDBLStub) \
- SymI_NeedsProto(vprintf$LDBLStub) \
- SymI_NeedsProto(vscanf$LDBLStub) \
- SymI_NeedsProto(vsnprintf$LDBLStub) \
- SymI_NeedsProto(vsprintf$LDBLStub) \
- SymI_NeedsProto(vsscanf$LDBLStub) \
- SymI_NeedsProto(vswprintf$LDBLStub) \
- SymI_NeedsProto(vswscanf$LDBLStub) \
- SymI_NeedsProto(vsyslog$LDBLStub) \
- SymI_NeedsProto(vwarn$LDBLStub) \
- SymI_NeedsProto(vwarnc$LDBLStub) \
- SymI_NeedsProto(vwarnx$LDBLStub) \
- SymI_NeedsProto(vwprintf$LDBLStub) \
- SymI_NeedsProto(vwscanf$LDBLStub) \
- SymI_NeedsProto(warn$LDBLStub) \
- SymI_NeedsProto(warnc$LDBLStub) \
- SymI_NeedsProto(warnx$LDBLStub) \
- SymI_NeedsProto(wcstold$LDBLStub) \
- SymI_NeedsProto(wprintf$LDBLStub) \
- SymI_NeedsProto(wscanf$LDBLStub)
- #else
- #define RTS_DARWIN_ONLY_SYMBOLS
- #endif
- #ifndef SMP
- # define MAIN_CAP_SYM SymI_HasProto(MainCapability)
- #else
- # define MAIN_CAP_SYM
- #endif
- #if !defined(mingw32_HOST_OS)
- #define RTS_USER_SIGNALS_SYMBOLS \
- SymI_HasProto(setIOManagerControlFd) \
- SymI_HasProto(setIOManagerWakeupFd) \
- SymI_HasProto(ioManagerWakeup) \
- SymI_HasProto(blockUserSignals) \
- SymI_HasProto(unblockUserSignals)
- #else
- #define RTS_USER_SIGNALS_SYMBOLS \
- SymI_HasProto(ioManagerWakeup) \
- SymI_HasProto(sendIOManagerEvent) \
- SymI_HasProto(readIOManagerEvent) \
- SymI_HasProto(getIOManagerEvent) \
- SymI_HasProto(console_handler)
- #endif
- #define RTS_LIBFFI_SYMBOLS \
- SymE_NeedsProto(ffi_prep_cif) \
- SymE_NeedsProto(ffi_call) \
- SymE_NeedsProto(ffi_type_void) \
- SymE_NeedsProto(ffi_type_float) \
- SymE_NeedsProto(ffi_type_double) \
- SymE_NeedsProto(ffi_type_sint64) \
- SymE_NeedsProto(ffi_type_uint64) \
- SymE_NeedsProto(ffi_type_sint32) \
- SymE_NeedsProto(ffi_type_uint32) \
- SymE_NeedsProto(ffi_type_sint16) \
- SymE_NeedsProto(ffi_type_uint16) \
- SymE_NeedsProto(ffi_type_sint8) \
- SymE_NeedsProto(ffi_type_uint8) \
- SymE_NeedsProto(ffi_type_pointer)
- #ifdef TABLES_NEXT_TO_CODE
- #define RTS_RET_SYMBOLS /* nothing */
- #else
- #define RTS_RET_SYMBOLS \
- SymI_HasProto(stg_enter_ret) \
- SymI_HasProto(stg_gc_fun_ret) \
- SymI_HasProto(stg_ap_v_ret) \
- SymI_HasProto(stg_ap_f_ret) \
- SymI_HasProto(stg_ap_d_ret) \
- SymI_HasProto(stg_ap_l_ret) \
- SymI_HasProto(stg_ap_v16_ret) \
- SymI_HasProto(stg_ap_n_ret) \
- SymI_HasProto(stg_ap_p_ret) \
- SymI_HasProto(stg_ap_pv_ret) \
- SymI_HasProto(stg_ap_pp_ret) \
- SymI_HasProto(stg_ap_ppv_ret) \
- SymI_HasProto(stg_ap_ppp_ret) \
- SymI_HasProto(stg_ap_pppv_ret) \
- SymI_HasProto(stg_ap_pppp_ret) \
- SymI_HasProto(stg_ap_ppppp_ret) \
- SymI_HasProto(stg_ap_pppppp_ret)
- #endif
- /* Modules compiled with -ticky may mention ticky counters */
- /* This list should marry up with the one in $(TOP)/includes/stg/Ticky.h */
- #define RTS_TICKY_SYMBOLS \
- SymI_NeedsProto(ticky_entry_ctrs) \
- SymI_NeedsProto(top_ct) \
- \
- SymI_HasProto(ENT_VIA_NODE_ctr) \
- SymI_HasProto(ENT_STATIC_THK_ctr) \
- SymI_HasProto(ENT_DYN_THK_ctr) \
- SymI_HasProto(ENT_STATIC_FUN_DIRECT_ctr) \
- SymI_HasProto(ENT_DYN_FUN_DIRECT_ctr) \
- SymI_HasProto(ENT_STATIC_CON_ctr) \
- SymI_HasProto(ENT_DYN_CON_ctr) \
- SymI_HasProto(ENT_STATIC_IND_ctr) \
- SymI_HasProto(ENT_DYN_IND_ctr) \
- SymI_HasProto(ENT_PERM_IND_ctr) \
- SymI_HasProto(ENT_PAP_ctr) \
- SymI_HasProto(ENT_AP_ctr) \
- SymI_HasProto(ENT_AP_STACK_ctr) \
- SymI_HasProto(ENT_BH_ctr) \
- SymI_HasProto(UNKNOWN_CALL_ctr) \
- SymI_HasProto(SLOW_CALL_v_ctr) \
- SymI_HasProto(SLOW_CALL_f_ctr) \
- SymI_HasProto(SLOW_CALL_d_ctr) \
- SymI_HasProto(SLOW_CALL_l_ctr) \
- SymI_HasProto(SLOW_CALL_n_ctr) \
- SymI_HasProto(SLOW_CALL_p_ctr) \
- SymI_HasProto(SLOW_CALL_pv_ctr) \
- SymI_HasProto(SLOW_CALL_pp_ctr) \
- SymI_HasProto(SLOW_CALL_ppv_ctr) \
- SymI_HasProto(SLOW_CALL_ppp_ctr) \
- SymI_HasProto(SLOW_CALL_pppv_ctr) \
- SymI_HasProto(SLOW_CALL_pppp_ctr) \
- SymI_HasProto(SLOW_CALL_ppppp_ctr) \
- SymI_HasProto(SLOW_CALL_pppppp_ctr) \
- SymI_HasProto(SLOW_CALL_OTHER_ctr) \
- SymI_HasProto(ticky_slow_call_unevald) \
- SymI_HasProto(SLOW_CALL_ctr) \
- SymI_HasProto(MULTI_CHUNK_SLOW_CALL_ctr) \
- SymI_HasProto(MULTI_CHUNK_SLOW_CALL_CHUNKS_ctr) \
- SymI_HasProto(KNOWN_CALL_ctr) \
- SymI_HasProto(KNOWN_CALL_TOO_FEW_ARGS_ctr) \
- SymI_HasProto(KNOWN_CALL_EXTRA_ARGS_ctr) \
- SymI_HasProto(SLOW_CALL_FUN_TOO_FEW_ctr) \
- SymI_HasProto(SLOW_CALL_FUN_CORRECT_ctr) \
- SymI_HasProto(SLOW_CALL_FUN_TOO_MANY_ctr) \
- SymI_HasProto(SLOW_CALL_PAP_TOO_FEW_ctr) \
- SymI_HasProto(SLOW_CALL_PAP_CORRECT_ctr) \
- SymI_HasProto(SLOW_CALL_PAP_TOO_MANY_ctr) \
- SymI_HasProto(SLOW_CALL_UNEVALD_ctr) \
- SymI_HasProto(UPDF_OMITTED_ctr) \
- SymI_HasProto(UPDF_PUSHED_ctr) \
- SymI_HasProto(CATCHF_PUSHED_ctr) \
- SymI_HasProto(UPDF_RCC_PUSHED_ctr) \
- SymI_HasProto(UPDF_RCC_OMITTED_ctr) \
- SymI_HasProto(UPD_SQUEEZED_ctr) \
- SymI_HasProto(UPD_CON_IN_NEW_ctr) \
- SymI_HasProto(UPD_CON_IN_PLACE_ctr) \
- SymI_HasProto(UPD_PAP_IN_NEW_ctr) \
- SymI_HasProto(UPD_PAP_IN_PLACE_ctr) \
- SymI_HasProto(ALLOC_HEAP_ctr) \
- SymI_HasProto(ALLOC_HEAP_tot) \
- SymI_HasProto(ALLOC_FUN_ctr) \
- SymI_HasProto(ALLOC_FUN_adm) \
- SymI_HasProto(ALLOC_FUN_gds) \
- SymI_HasProto(ALLOC_FUN_slp) \
- SymI_HasProto(UPD_NEW_IND_ctr) \
- SymI_HasProto(UPD_NEW_PERM_IND_ctr) \
- SymI_HasProto(UPD_OLD_IND_ctr) \
- SymI_HasProto(UPD_OLD_PERM_IND_ctr) \
- SymI_HasProto(UPD_BH_UPDATABLE_ctr) \
- SymI_HasProto(UPD_BH_SINGLE_ENTRY_ctr) \
- SymI_HasProto(UPD_CAF_BH_UPDATABLE_ctr) \
- SymI_HasProto(UPD_CAF_BH_SINGLE_ENTRY_ctr) \
- SymI_HasProto(GC_SEL_ABANDONED_ctr) \
- SymI_HasProto(GC_SEL_MINOR_ctr) \
- SymI_HasProto(GC_SEL_MAJOR_ctr) \
- SymI_HasProto(GC_FAILED_PROMOTION_ctr) \
- SymI_HasProto(ALLOC_UP_THK_ctr) \
- SymI_HasProto(ALLOC_SE_THK_ctr) \
- SymI_HasProto(ALLOC_THK_adm) \
- SymI_HasProto(ALLOC_THK_gds) \
- SymI_HasProto(ALLOC_THK_slp) \
- SymI_HasProto(ALLOC_CON_ctr) \
- SymI_HasProto(ALLOC_CON_adm) \
- SymI_HasProto(ALLOC_CON_gds) \
- SymI_HasProto(ALLOC_CON_slp) \
- SymI_HasProto(ALLOC_TUP_ctr) \
- SymI_HasProto(ALLOC_TUP_adm) \
- SymI_HasProto(ALLOC_TUP_gds) \
- SymI_HasProto(ALLOC_TUP_slp) \
- SymI_HasProto(ALLOC_BH_ctr) \
- SymI_HasProto(ALLOC_BH_adm) \
- SymI_HasProto(ALLOC_BH_gds) \
- SymI_HasProto(ALLOC_BH_slp) \
- SymI_HasProto(ALLOC_PRIM_ctr) \
- SymI_HasProto(ALLOC_PRIM_adm) \
- SymI_HasProto(ALLOC_PRIM_gds) \
- SymI_HasProto(ALLOC_PRIM_slp) \
- SymI_HasProto(ALLOC_PAP_ctr) \
- SymI_HasProto(ALLOC_PAP_adm) \
- SymI_HasProto(ALLOC_PAP_gds) \
- SymI_HasProto(ALLOC_PAP_slp) \
- SymI_HasProto(ALLOC_TSO_ctr) \
- SymI_HasProto(ALLOC_TSO_adm) \
- SymI_HasProto(ALLOC_TSO_gds) \
- SymI_HasProto(ALLOC_TSO_slp) \
- SymI_HasProto(RET_NEW_ctr) \
- SymI_HasProto(RET_OLD_ctr) \
- SymI_HasProto(RET_UNBOXED_TUP_ctr) \
- SymI_HasProto(RET_SEMI_loads_avoided)
- // On most platforms, the garbage collector rewrites references
- // to small integer and char objects to a set of common, shared ones.
- //
- // We don't do this when compiling to Windows DLLs at the moment because
- // it doesn't support cross package data references well.
- //
- #if defined(COMPILING_WINDOWS_DLL)
- #define RTS_INTCHAR_SYMBOLS
- #else
- #define RTS_INTCHAR_SYMBOLS \
- SymI_HasProto(stg_CHARLIKE_closure) \
- SymI_HasProto(stg_INTLIKE_closure)
- #endif
- #define RTS_SYMBOLS \
- Maybe_Stable_Names \
- RTS_TICKY_SYMBOLS \
- SymI_HasProto(StgReturn) \
- SymI_HasProto(stg_gc_noregs) \
- SymI_HasProto(stg_ret_v_info) \
- SymI_HasProto(stg_ret_p_info) \
- SymI_HasProto(stg_ret_n_info) \
- SymI_HasProto(stg_ret_f_info) \
- SymI_HasProto(stg_ret_d_info) \
- SymI_HasProto(stg_ret_l_info) \
- SymI_HasProto(stg_gc_prim_p) \
- SymI_HasProto(stg_gc_prim_pp) \
- SymI_HasProto(stg_gc_prim_n) \
- SymI_HasProto(stg_enter_info) \
- SymI_HasProto(__stg_gc_enter_1) \
- SymI_HasProto(stg_gc_unpt_r1) \
- SymI_HasProto(stg_gc_unbx_r1) \
- SymI_HasProto(stg_gc_f1) \
- SymI_HasProto(stg_gc_d1) \
- SymI_HasProto(stg_gc_l1) \
- SymI_HasProto(stg_gc_pp) \
- SymI_HasProto(stg_gc_ppp) \
- SymI_HasProto(stg_gc_pppp) \
- SymI_HasProto(__stg_gc_fun) \
- SymI_HasProto(stg_gc_fun_info) \
- SymI_HasProto(stg_yield_noregs) \
- SymI_HasProto(stg_yield_t…
Large files files are truncated, but you can click here to view the full file