projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Emit .bat version of -inplace script on Windows platforms
[ghc-hetmet.git]
/
rts
/
Linker.c
diff --git
a/rts/Linker.c
b/rts/Linker.c
index
4aca397
..
53def90
100644
(file)
--- a/
rts/Linker.c
+++ b/
rts/Linker.c
@@
-25,8
+25,8
@@
#include "LinkerInternals.h"
#include "RtsUtils.h"
#include "Schedule.h"
#include "LinkerInternals.h"
#include "RtsUtils.h"
#include "Schedule.h"
-#include "Storage.h"
#include "Sparks.h"
#include "Sparks.h"
+#include "RtsTypeable.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@
-333,6
+333,7
@@
typedef struct _RtsSymbolVal {
Sym(mktime) \
Sym(_imp___timezone) \
Sym(_imp___tzname) \
Sym(mktime) \
Sym(_imp___timezone) \
Sym(_imp___tzname) \
+ Sym(_imp__tzname) \
Sym(_imp___iob) \
Sym(_imp___osver) \
Sym(localtime) \
Sym(_imp___iob) \
Sym(_imp___osver) \
Sym(localtime) \
@@
-486,6
+487,7
@@
typedef struct _RtsSymbolVal {
SymX(catchzh_fast) \
SymX(catchRetryzh_fast) \
SymX(catchSTMzh_fast) \
SymX(catchzh_fast) \
SymX(catchRetryzh_fast) \
SymX(catchSTMzh_fast) \
+ SymX(checkzh_fast) \
SymX(closure_flags) \
SymX(cmp_thread) \
SymX(cmpIntegerzh_fast) \
SymX(closure_flags) \
SymX(cmp_thread) \
SymX(cmpIntegerzh_fast) \
@@
-507,6
+509,7
@@
typedef struct _RtsSymbolVal {
SymX(forkOS_createThread) \
SymX(freeHaskellFunctionPtr) \
SymX(freeStablePtr) \
SymX(forkOS_createThread) \
SymX(freeHaskellFunctionPtr) \
SymX(freeStablePtr) \
+ SymX(getOrSetTypeableStore) \
SymX(gcdIntegerzh_fast) \
SymX(gcdIntegerIntzh_fast) \
SymX(gcdIntzh_fast) \
SymX(gcdIntegerzh_fast) \
SymX(gcdIntegerIntzh_fast) \
SymX(gcdIntzh_fast) \
@@
-707,7
+710,8
@@
typedef struct _RtsSymbolVal {
SymX(stg_interp_constr6_entry) \
SymX(stg_interp_constr7_entry) \
SymX(stg_interp_constr8_entry) \
SymX(stg_interp_constr6_entry) \
SymX(stg_interp_constr7_entry) \
SymX(stg_interp_constr8_entry) \
- SymX(stgMallocBytesRWX) \
+ SymX(allocateExec) \
+ SymX(freeExec) \
SymX(getAllocations) \
SymX(revertCAFs) \
SymX(RtsFlags) \
SymX(getAllocations) \
SymX(revertCAFs) \
SymX(RtsFlags) \
@@
-823,7
+827,7
@@
initFreeList(rootEntry *table, nat n, rootEntry *free)
root_ptr_free = table;
}
root_ptr_free = table;
}
-void
+static void
initRootPtrTable(void)
{
if (RPT_size > 0)
initRootPtrTable(void)
{
if (RPT_size > 0)
@@
-837,7
+841,7
@@
initRootPtrTable(void)
}
}
-void
+static void
enlargeRootPtrTable(void)
{
nat old_RPT_size = RPT_size;
enlargeRootPtrTable(void)
{
nat old_RPT_size = RPT_size;
@@
-937,11
+941,6
@@
static int linker_init_done = 0 ;
static void *dl_prog_handle;
#endif
static void *dl_prog_handle;
#endif
-/* dlopen(NULL,..) doesn't work so we grab libc explicitly */
-#if defined(openbsd_HOST_OS)
-static void *dl_libc_handle;
-#endif
-
void
initLinker( void )
{
void
initLinker( void )
{
@@
-971,9
+970,6
@@
initLinker( void )
dl_prog_handle = RTLD_DEFAULT;
# else
dl_prog_handle = dlopen(NULL, RTLD_LAZY);
dl_prog_handle = RTLD_DEFAULT;
# else
dl_prog_handle = dlopen(NULL, RTLD_LAZY);
-# if defined(openbsd_HOST_OS)
- dl_libc_handle = dlopen("libc.so", RTLD_LAZY);
-# endif
# endif /* RTLD_DEFAULT */
# endif
}
# endif /* RTLD_DEFAULT */
# endif
}
@@
-1124,10
+1120,7
@@
lookupSymbol( char *lbl )
if (val == NULL) {
# if defined(OBJFORMAT_ELF)
if (val == NULL) {
# if defined(OBJFORMAT_ELF)
-# if defined(openbsd_HOST_OS)
- val = dlsym(dl_prog_handle, lbl);
- return (val != NULL) ? val : dlsym(dl_libc_handle,lbl);
-# elif defined(x86_64_HOST_ARCH)
+# if defined(x86_64_HOST_ARCH)
val = dlsym(dl_prog_handle, lbl);
if (val >= (void *)0x80000000) {
void *new_val;
val = dlsym(dl_prog_handle, lbl);
if (val >= (void *)0x80000000) {
void *new_val;
@@
-1137,7
+1130,7
@@
lookupSymbol( char *lbl )
} else {
return val;
}
} else {
return val;
}
-# else /* not openbsd */
+# else
return dlsym(dl_prog_handle, lbl);
# endif
# elif defined(OBJFORMAT_MACHO)
return dlsym(dl_prog_handle, lbl);
# endif
# elif defined(OBJFORMAT_MACHO)
@@
-2280,6
+2273,8
@@
ocGetNames_PEi386 ( ObjectCode* oc )
&& 0 != strcmp(".stabstr", sectab_i->Name)
/* ignore constructor section for now */
&& 0 != strcmp(".ctors", sectab_i->Name)
&& 0 != strcmp(".stabstr", sectab_i->Name)
/* ignore constructor section for now */
&& 0 != strcmp(".ctors", sectab_i->Name)
+ /* ignore section generated from .ident */
+ && 0!= strcmp("/4", sectab_i->Name)
) {
errorBelch("Unknown PEi386 section name `%s' (while processing: %s)", sectab_i->Name, oc->fileName);
return 0;
) {
errorBelch("Unknown PEi386 section name `%s' (while processing: %s)", sectab_i->Name, oc->fileName);
return 0;
@@
-2497,14
+2492,14
@@
ocResolve_PEi386 ( ObjectCode* oc )
+ sym->Value);
} else {
copyName ( sym->Name, strtab, symbol, 1000-1 );
+ sym->Value);
} else {
copyName ( sym->Name, strtab, symbol, 1000-1 );
- (void*)S = lookupLocalSymbol( oc, symbol );
+ S = (UInt32) lookupLocalSymbol( oc, symbol );
if ((void*)S != NULL) goto foundit;
if ((void*)S != NULL) goto foundit;
- (void*)S = lookupSymbol( symbol );
+ S = (UInt32) lookupSymbol( symbol );
if ((void*)S != NULL) goto foundit;
zapTrailingAtSign ( symbol );
if ((void*)S != NULL) goto foundit;
zapTrailingAtSign ( symbol );
- (void*)S = lookupLocalSymbol( oc, symbol );
+ S = (UInt32) lookupLocalSymbol( oc, symbol );
if ((void*)S != NULL) goto foundit;
if ((void*)S != NULL) goto foundit;
- (void*)S = lookupSymbol( symbol );
+ S = (UInt32) lookupSymbol( symbol );
if ((void*)S != NULL) goto foundit;
/* Newline first because the interactive linker has printed "linking..." */
errorBelch("\n%s: unknown symbol `%s'", oc->fileName, symbol);
if ((void*)S != NULL) goto foundit;
/* Newline first because the interactive linker has printed "linking..." */
errorBelch("\n%s: unknown symbol `%s'", oc->fileName, symbol);