[ ghc-Bugs-425217 ] GHCi + profiling doesn't work

noreply@sourceforge.net noreply@sourceforge.net
Tue, 22 May 2001 07:27:27 -0700


Bugs item #425217, was updated on 2001-05-18 08:47
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=425217&group_id=8032

>Category: Compiler
Group: 5.00
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Nils Anders Danielsson (nilsanders)
Assigned to: Nobody/Anonymous (nobody)
Summary: GHCi + profiling doesn't work

Initial Comment:
Main.hs:

module Main where

main = putStrLn "Hi!"

Compile this with profiling turned on:

> ghc -prof -auto-all -o hello --make Main.hs
ghc-5.00: chasing modules from: Main.hs
Compiling Main             ( Main.hs, ./Main.o )
ghc: linking ...

Try to load the file with GHCi:

> ghci Main 
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version
5.00, For Haskell 98.
/ /_\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package std ... linking ... done.
Skipping  Main             ( Main.hs, ./Main.o )
ghc-5.00: fatal error: do_Elf32_Rel_relocations: 
./Main.o: unknown symbol `CC_LIST'


----------------------------------------------------------------------

>Comment By: Simon Marlow (simonmar)
Date: 2001-05-22 07:27

Message:
Logged In: YES 
user_id=48280

If you had run GHCi with the -prof flag, it would have 
emitted the following error message:

     --interactive can't be used with -prof, -ticky, -unreg 
or -smp

But you tried to load a profiled .o file into GHCi without 
giving it any flags.  The normal GHC would have also failed 
with a link error in this situation, so I don't consider it 
a bug.

Perhaps profiled object files should be called .p_o instead 
of plain .o (there are arguments both ways), and/or perhaps 
we should re-instate the object consistency checking that 
GHC had some time ago.  Feel free to submit a feature 
request :-)

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=108032&aid=425217&group_id=8032