projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-08-20 15:07:56 by simonmar]
[ghc-hetmet.git]
/
ghc
/
rts
/
Linker.c
diff --git
a/ghc/rts/Linker.c
b/ghc/rts/Linker.c
index
03fc676
..
61b0034
100644
(file)
--- a/
ghc/rts/Linker.c
+++ b/
ghc/rts/Linker.c
@@
-1,5
+1,5
@@
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Linker.c,v 1.122 2003/06/24 08:29:13 stolz Exp $
+ * $Id: Linker.c,v 1.126 2003/08/18 09:27:54 dons Exp $
*
* (c) The GHC Team, 2000-2003
*
*
* (c) The GHC Team, 2000-2003
*
@@
-59,7
+59,7
@@
#include <sys/mman.h>
#endif
#include <sys/mman.h>
#endif
-#if defined(linux_TARGET_OS) || defined(solaris2_TARGET_OS) || defined(freebsd_TARGET_OS) || defined(netbsd_TARGET_OS)
+#if defined(linux_TARGET_OS) || defined(solaris2_TARGET_OS) || defined(freebsd_TARGET_OS) || defined(netbsd_TARGET_OS) || defined(openbsd_TARGET_OS)
# define OBJFORMAT_ELF
#elif defined(cygwin32_TARGET_OS) || defined (mingw32_TARGET_OS)
# define OBJFORMAT_PEi386
# define OBJFORMAT_ELF
#elif defined(cygwin32_TARGET_OS) || defined (mingw32_TARGET_OS)
# define OBJFORMAT_PEi386
@@
-411,6
+411,7
@@
typedef struct _RtsSymbolVal {
SymX(quotIntegerzh_fast) \
SymX(quotRemIntegerzh_fast) \
SymX(raisezh_fast) \
SymX(quotIntegerzh_fast) \
SymX(quotRemIntegerzh_fast) \
SymX(raisezh_fast) \
+ SymX(raiseIOzh_fast) \
SymX(remIntegerzh_fast) \
SymX(resetNonBlockingFd) \
SymX(resumeThread) \
SymX(remIntegerzh_fast) \
SymX(resetNonBlockingFd) \
SymX(resumeThread) \
@@
-460,6
+461,8
@@
typedef struct _RtsSymbolVal {
SymX(stable_ptr_table) \
SymX(stackOverflow) \
SymX(stg_CAF_BLACKHOLE_info) \
SymX(stable_ptr_table) \
SymX(stackOverflow) \
SymX(stg_CAF_BLACKHOLE_info) \
+ SymX(stg_BLACKHOLE_BQ_info) \
+ SymX(awakenBlockedQueue) \
SymX(stg_CHARLIKE_closure) \
SymX(stg_EMPTY_MVAR_info) \
SymX(stg_IND_STATIC_info) \
SymX(stg_CHARLIKE_closure) \
SymX(stg_EMPTY_MVAR_info) \
SymX(stg_IND_STATIC_info) \
@@
-575,7
+578,7
@@
typedef struct _RtsSymbolVal {
#endif
/* entirely bogus claims about types of these symbols */
#endif
/* entirely bogus claims about types of these symbols */
-#define Sym(vvv) extern void vvv();
+#define Sym(vvv) extern void vvv(void);
#define SymX(vvv) /**/
#define SymX_redirect(vvv,xxx) /**/
RTS_SYMBOLS
#define SymX(vvv) /**/
#define SymX_redirect(vvv,xxx) /**/
RTS_SYMBOLS
@@
-732,7
+735,11
@@
addDLL( char *dll_name )
initLinker();
initLinker();
+#if !defined(openbsd_TARGET_OS)
hdl= dlopen(dll_name, RTLD_NOW | RTLD_GLOBAL);
hdl= dlopen(dll_name, RTLD_NOW | RTLD_GLOBAL);
+#else
+ hdl= dlopen(dll_name, RTLD_LAZY);
+#endif
if (hdl == NULL) {
/* dlopen failed; return a ptr to the error msg. */
errmsg = dlerror();
if (hdl == NULL) {
/* dlopen failed; return a ptr to the error msg. */
errmsg = dlerror();
@@
-2009,7
+2016,15
@@
ocResolve_PEi386 ( ObjectCode* oc )
# define ELF_NEED_PLT /* needs Procedure Linkage Tables */
#endif
# define ELF_NEED_PLT /* needs Procedure Linkage Tables */
#endif
+#if !defined(openbsd_TARGET_OS)
#include <elf.h>
#include <elf.h>
+#else
+/* openbsd elf has things in different places, with diff names */
+#include <elf_abi.h>
+#include <machine/reloc.h>
+#define R_386_32 RELOC_32
+#define R_386_PC32 RELOC_PC32
+#endif
/*
* Define a set of types which can be used for both ELF32 and ELF64
/*
* Define a set of types which can be used for both ELF32 and ELF64