Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
90ef8ab2
Commit
90ef8ab2
authored
Aug 06, 2007
by
Clemens Fruhwirth
Browse files
Introduce new class for external symbols in Linker.c that use __imp__<sym> instead of &<sym>
parent
f2704299
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/Linker.c
View file @
90ef8ab2
...
...
@@ -477,12 +477,12 @@ typedef struct _RtsSymbolVal {
SymX(__encodeDouble) \
SymX(__encodeFloat) \
SymX(addDLL) \
Sym
X
(__gmpn_gcd_1) \
Sym
X
(__gmpz_cmp)
\
Sym
X
(__gmpz_cmp_si) \
Sym
X
(__gmpz_cmp_ui) \
Sym
X
(__gmpz_get_si) \
Sym
X
(__gmpz_get_ui) \
Sym
Extern
(__gmpn_gcd_1) \
Sym
Extern
(__gmpz_cmp) \
Sym
Extern
(__gmpz_cmp_si) \
Sym
Extern
(__gmpz_cmp_ui) \
Sym
Extern
(__gmpz_get_si) \
Sym
Extern
(__gmpz_get_ui) \
SymX(__int_encodeDouble) \
SymX(__int_encodeFloat) \
SymX(andIntegerzh_fast) \
...
...
@@ -766,6 +766,11 @@ typedef struct _RtsSymbolVal {
/* entirely bogus claims about types of these symbols */
#define Sym(vvv) extern void vvv(void);
#ifdef ENABLE_WIN32_DLL_SUPPORT
#define SymExtern(vvv) extern void _imp__ ## vvv (void);
#else
#define SymExtern(vvv) SymX(vvv)
#endif
#define SymX(vvv)
/**/
#define SymX_redirect(vvv,xxx)
/**/
RTS_SYMBOLS
...
...
@@ -779,6 +784,7 @@ RTS_LIBGCC_SYMBOLS
#undef Sym
#undef SymX
#undef SymX_redirect
#undef SymExtern
#ifdef LEADING_UNDERSCORE
#define MAYBE_LEADING_UNDERSCORE_STR(s) ("_" s)
...
...
@@ -789,6 +795,12 @@ RTS_LIBGCC_SYMBOLS
#define Sym(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \
(void*)(&(vvv)) },
#define SymX(vvv) Sym(vvv)
#ifdef ENABLE_WIN32_DLL_SUPPORT
#define SymExtern(vvv) { MAYBE_LEADING_UNDERSCORE_STR(#vvv), \
(void*)(_imp__ ## vvv) },
#else
#define SymExtern(vvv) Sym(vvv)
#endif
// SymX_redirect allows us to redirect references to one symbol to
// another symbol. See newCAF/newDynCAF for an example.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment