#5240: help GNU ld to use less memory when linking libraries compiled with 
-split-
objs.
---------------------------------+------------------------------------------
    Reporter:  int-e             |       Owner:              
        Type:  feature request   |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  7.0.3             |    Keywords:              
    Testcase:                    |   Blockedby:              
          Os:  Unknown/Multiple  |    Blocking:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 This is a well-known problem, but I didn't find a previous report here,
 probably because it is mainly a GNU ld issue. The problem is that with
 -split-objs, linking, say, ghc, takes a trememndous amount of memory.

 Part of this problem will be fixed in ld:
   http://sourceware.org/bugzilla/show_bug.cgi?id=12682

 In this bug report, Nick Clifton suggests to use '--hash-size=31' and
 possibly '--reduce-memory-overhead' when invoking ld. Since ghc is
 invoking gcc for linking, that would mean passing '-Xlinker --hash-
 size=31' and perhaps '-Xlinker --reduce-memory-overhead' to gcc.

 Can we do that? Care needs to be taken if people use the -pgmL option, and
 we should make sure that gcc is actually using GNU ld.

 In my experiments (linking ghc), --hash-size=31 helps, reducing memory
 usage by about a factor of 1/2; --reduce-memory-overhead without --hash-
 size=31 also helps (saving about 1/3), but has no noticable effect in
 connection with --hash-size=31. Based on that I'd suggest to only use
 --hash-size=31.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to