Rip out ld.bfd-specific link options from driver
For as long as I can remember GHC has been hard-coded to add --reduce-memory-overheads
and --hash-size=-31
to the linker command-line when it thinks it's using ld.bfd
(see GHC.SysTools.Info
). It appears that this logic was introduced due to #5240 (closed), which appears to be concerned with the old -split-objs
method of dead-code dropping. Not only is it quite unclear whether this logic is necessary or helpful with -split-sections
, it's very likely that it is significantly blowing up link times.
While the documentation claims that the --reduce-memory-overheads
may reduce memory consumption by anywhere from 0% to 40%, @Phyx suggests that the high end is likely an outlier. Moreover, he points out that the flag changes the link map generation from a linear to a quadratic algorithm.
We should remove this logic and, if it's still helpful, move it into the configure
script where it belongs.