[PATCH] Fix -unawareness of large-addresses on mingw (#8520)

kyra kyrab at mail.ru
Wed Jun 4 08:15:36 UTC 2014


LARGEADDRESSAWARE flag if set in executable's header tells the OS that 
the application can handle addresses larger than 2GB.

For 32-bit executables it is disabled usually. To enable it we must tell 
linker to enable it or manually edit an executable - for example, 
peflags of editbin (from Microsoft) utilities could be used.

Cheers,
Kyra

On 6/4/2014 11:23, Simon Marlow wrote:
> I don't know what this does, and there doesn't seem to be any info in 
> #8520 either.
>
> Could you add the patch to the ticket, and help us out by saying why 
> this fixes the problem (and if possible, explain why it won't break 
> anything else)?
>
> On 03/06/2014 07:06, transfuturist wrote:
>> ---
>>   compiler/main/SysTools.lhs | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
>> index dc9642d..1cf1155 100644
>> --- a/compiler/main/SysTools.lhs
>> +++ b/compiler/main/SysTools.lhs
>> @@ -740,6 +740,7 @@ getLinkerInfo' dflags = do
>>                      [ -- Reduce ld memory usage
>>                        "-Wl,--hash-size=31"
>>                      , "-Wl,--reduce-memory-overheads"
>> +                   , "-Wl,--large-address-aware"      --Trac #8520
>>                        -- Increase default stack, see
>>                        -- Note [Windows stack usage]
>>                      , "-Xlinker", "--stack=0x800000,0x800000" ]
>>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>



More information about the ghc-devs mailing list