Opened 14 years ago

Closed 14 years ago

Last modified 46 years ago

#545 closed bug (Wont Fix)

GHCi + profiling doesn't work

Reported by: nilsanders Owned by: nobody
Priority: normal Milestone:
Component: Compiler Version: 5.0
Keywords: Cc:
Operating System: Architecture:
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):



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.
/ /_\\/ __  / /___| |
\____/\/ /_/\____/|_|      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'

Change History (1)

comment:1 Changed 14 years ago by simonmar

  • Status changed from assigned to closed
Logged In: YES 

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 :-)
Note: See TracTickets for help on using tickets.