[commit: ghc] ghc-7.8: rts/Linker.c: declare 'deRefStablePtr' as an exported 'rts' symbol (b2f306e)

git at git.haskell.org git at git.haskell.org
Mon Oct 27 15:59:11 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/b2f306e24541ff750b9113a23c6dd6146e2f12c1/ghc

>---------------------------------------------------------------

commit b2f306e24541ff750b9113a23c6dd6146e2f12c1
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Sat Aug 23 13:11:23 2014 +0300

    rts/Linker.c: declare 'deRefStablePtr' as an exported 'rts' symbol
    
        $ inplace/bin/ghc-stage2 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -optc-fno-builtin -fno-ghci-history \
            testsuite/tests/ffi/should_run/T4038.hs --interactive -v0 -ignore-dot-ghci +RTS -I0.1 -RTS
    
        *Main> main
        <interactive>: /tmp/ghc16668_0/ghc16668_5.o: unknown symbol `deRefStablePtr'
    
    The reference to 'deRefStablePtr' is generated by 'compiler/deSugar/DsForeign.lhs':
        the_cfun
           = case maybe_target of
              Nothing    -> text "(StgClosure*)deRefStablePtr(the_stableptr)"
              Just hs_fn -> char '&' <> ppr hs_fn <> text "_closure"
    
    Patch fixes all broken tests using 'import wrapper':
        TEST="ffi013 ffi010 ffi011 ffi005 ffi020 ffi006 ffi019 fed001 T1679 T4038"
    
    Tests manifested as broken only in DYNAMIC_GHC_PROGRAMS=NO builds,
    where GHCi's custom linker is used instead of system's linker.
    
    Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
    (cherry picked from commit 104a66a461f4f89b8e5ad9c829923bb7ca8ceddb)


>---------------------------------------------------------------

b2f306e24541ff750b9113a23c6dd6146e2f12c1
 rts/Linker.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rts/Linker.c b/rts/Linker.c
index 47b4008..ceb6a4f 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1090,6 +1090,7 @@ typedef struct _RtsSymbolVal {
       SymI_HasProto(__word_encodeFloat)                                 \
       SymI_HasProto(stg_atomicallyzh)                                   \
       SymI_HasProto(barf)                                               \
+      SymI_HasProto(deRefStablePtr)                                     \
       SymI_HasProto(debugBelch)                                         \
       SymI_HasProto(errorBelch)                                         \
       SymI_HasProto(sysErrorBelch)                                      \



More information about the ghc-commits mailing list