Tue Oct 26 06:51:53 PDT 2010  [email protected]
  * Fix for #4318 (Linker failure on OS X 10.6)
  
  This patch fixes two bugs in the Mach-O linker and adds debugging statements
  to the same. The bugs:
  
  1. The test for symbol->n_value == 0 is removed and replaced by a test of the
  flag field.  Checking the n_value field was just wrong; the value of a
  symbol should only be examined when allocating space for a common block,
  in which case the n_value field gives the size of the block.  This bug
  led to an infrequently occuring linker crash.
  
  I believe the behavior of the linker now agrees with the intent of the
  sketchy Apple documentation.
  
  2. Jump islands were being filled with garbage instead of the the location
  of the referenced symbol. This caused relocations of type X86_64_RELOC_GOT and
  X86_64_RELOC_GOT_LOAD to eventually lead to crashes.  The fix is simply to
  look up the symbol.
  
  Enough debug statements have been added to follow the operation of the Mach-O
  linker while it loads modules.  They are not yet as informative and well
  organized as for ELF.  Improving the debug statements will require some
  reorganization of the code -- the Mach-O linker seems basically sound, but
  is crying out for some refactoring and commenting.
      

    M ./rts/Linker.c -27 +89

View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20101026135153-870a6-c267c8d2fd2835d1cb58adfe8d6ac36266f5391b.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to