#5111: linux-powerpc : segfault in stage2 compiler
-------------------------+--------------------------------------------------
    Reporter:  erikd     |        Owner:                       
        Type:  bug       |       Status:  new                  
    Priority:  normal    |    Milestone:                       
   Component:  Compiler  |      Version:  7.1                  
    Keywords:            |     Testcase:                       
   Blockedby:            |   Difficulty:                       
          Os:  Linux     |     Blocking:                       
Architecture:  powerpc   |      Failure:  Installing GHC failed
-------------------------+--------------------------------------------------

Comment(by erikd):

 The
 
[http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html
 Mach-O documentation] suggests that the alignment is calculated by:

 {{{
 misalignment = (header.sizeofcmds + sizeof(header)) & 0xF;
 return misalignment ? (16 - misalignment) : 0;
 }}}

 is all about finding the start of the actual code within the object file.

 My reading of the ELF documentation suggests that the ELF version should
 look like this:

 {{{
 misalignment = header.e_ehsize & 0xF;
 return misalignment ? (16 - misalignment) : 0;}}}
 }}}

 but that still doesn't work. For all the ghc generated object files I've
 seen the .text section immediately follows the `ELF` header whose size if
 specified by e_ehsize.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to