Linking trouble

Simon Marlow simonmar@microsoft.com
Tue, 2 Jan 2001 03:19:48 -0800


> Just a final mail for this year. GHC 4.11 just bootstrapped fine,
> but I noticed two things:
> 
>    * The HS*.o files are not installed with `make install'.
> 
>    * The xargs-technique doesn't work for `ld -r -x -o HSfoo.o'
>      because HSfoo.o is simply overwritten several times with
>      partial content this way. I can't find an option for ld
>      to make it read the names of the files to link from a file,
>      but GNU ld opens another route via the already existing
>      libHSfoo.a:
> 
>         ld -r -x -o HSfoo.o --whole-archive -L. -lHSfoo
> 
>      Don't know about other linkers, though...

I've had real trouble with GNU ld building these HS*.o files.
Basically, when the number of object files passes a certain limit, ld
starts dropping them from the output.  This bites particularly when
trying to build HS*.o from split object files (try it: the resulting
HSstd.o should have no undefined symbols except for those in the RTS).

I'll try your --whole-archive trick and see if that makes a difference.

Cheers,
	Simon