From 9e41f44aba21e28fc905c482dcaba4642a2a8d67 Mon Sep 17 00:00:00 2001 From: sewardj Date: Tue, 15 May 2001 15:01:48 +0000 Subject: [PATCH] [project @ 2001-05-15 15:01:48 by sewardj] Handle leading underscores correctly, for ghci on Win32. --- ghc/compiler/ghci/Linker.lhs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/ghci/Linker.lhs b/ghc/compiler/ghci/Linker.lhs index 8b0d15a..1d3e7b7 100644 --- a/ghc/compiler/ghci/Linker.lhs +++ b/ghc/compiler/ghci/Linker.lhs @@ -5,6 +5,10 @@ \begin{code} {-# OPTIONS -#include "Linker.h" #-} + +-- so that we can see defn of LEADING_UNDERSCORE +#include "../includes/config.h" + module Linker ( initLinker, -- :: IO () loadObj, -- :: String -> IO () @@ -24,7 +28,12 @@ import Panic ( panic ) -- RTS Linker Interface -- --------------------------------------------------------------------------- -lookupSymbol str = do +lookupSymbol str_in = do +# ifdef LEADING_UNDERSCORE + let str = '_':str_in +# else + let str = str_in +# endif addr <- c_lookupSymbol (packString str) if addr == nullPtr then return Nothing -- 1.7.10.4