[GHC] #4984: OS X: ld: warning: -read_only_relocs cannot be used with x86_64

GHC cvs-ghc at haskell.org
Sat Mar 12 23:01:41 CET 2011


#4984: OS X: ld: warning: -read_only_relocs cannot be used with x86_64
-------------------------------+--------------------------------------------
    Reporter:  igloo           |        Owner:              
        Type:  bug             |       Status:  patch       
    Priority:  high            |    Milestone:  7.2.1       
   Component:  Compiler        |      Version:  7.0.2       
    Keywords:                  |     Testcase:              
   Blockedby:                  |   Difficulty:              
          Os:  MacOS X         |     Blocking:              
Architecture:  x86_64 (amd64)  |      Failure:  None/Unknown
-------------------------------+--------------------------------------------

Comment(by altaic):

 Should I open a new ticket for the compact unwinds issue?

 In the meantime, here's a discussion regarding compact unwinds @ LLVMdev:
 [http://groups.google.com/group/llvm-
 dev/browse_thread/thread/8baba4531a9feb07/139c9eba3525ebe]

 Nick Kledzik's response:
 {{{
 I dug into this.  Based on the .s files in bugzilla, the latest gcc is
 now adding dwarf unwind info to describe the function epilog.  If you
 run dwarfdump --eh-frame on the .o files made with the new compiler,
 you'll see extra dwarf unwind instructions at the end like:
                  ...
                  DW_CFA_advance_loc4 (64)  #<-- advance to near end of
 function
                  DW_CFA_restore (rbp)
                  DW_CFA_def_cfa (rsp, 8)
                  DW_CFA_nop
                  DW_CFA_nop
 The linker's conversion to compact unwind "runs" the dwarf unwind info
 for a function and then records the state at the end.  Adding unwind
 info for the epilog breaks this.  In the long term, I can add
 heuristics to the linker to detect that what looks like unwind info
 for the epilog and stop processing the dwarf instructions.
 The short term fix for gcc is to *not* add epilog unwind information
 for Darwin.
 Epilog unwind information is never needed for exception processing.
 Its only use is for debugging or sampling when you want to
 asynchronously make a stack back trace.
 -Nick
 }}}

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



More information about the Glasgow-haskell-bugs mailing list