[GHC] #706: GHC links _stub.o files regardless of whether any 'foreign import' decls remain in a .hs file

GHC trac at galois.com
Sun Feb 26 16:05:19 EST 2006


#706: GHC links _stub.o files regardless of whether any 'foreign import' decls
remain in a .hs file
---------------------------------+------------------------------------------
    Reporter:  ncalexan at uci.edu  |        Owner:           
        Type:  bug               |       Status:  new      
    Priority:  normal            |    Milestone:           
   Component:  Compiler (FFI)    |      Version:  6.4.1    
    Severity:  minor             |     Keywords:  ffi, link
          Os:  MacOS X           |   Difficulty:  Unknown  
Architecture:  powerpc           |  
---------------------------------+------------------------------------------
It appears GHC links any _stub.o files it can find, which is not correct
 (although usually it only leads to duplicate symbols.)  To duplicate, have
 two modules A and B, and a foreign import in A.  A_stub.o will be built as
 usual.  Copy A_stub.o to B_stub.o, relink and have duplicate symbols.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/706>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list