Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mark win32 binaries as large address aware
By default, 32-bit Windows executables are restricted to 2GiB of address
space even when running on 64-bit Windows when 4GiB is available.

Closes #17043
  • Loading branch information
thestinger committed Sep 6, 2014
1 parent d8a2618 commit c6633fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librustc/back/link.rs
Expand Up @@ -1019,6 +1019,12 @@ fn link_args(cmd: &mut Command,

// Mark all dynamic libraries and executables as compatible with ASLR
cmd.arg("-Wl,--dynamicbase");

// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
// space available to x86 Windows binaries on x86_64.
if sess.targ_cfg.arch == abi::X86 {
cmd.arg("-Wl,--large-address-aware");
}
}

if sess.targ_cfg.os == abi::OsAndroid {
Expand Down

5 comments on commit c6633fd

@bors
Copy link
Contributor

@bors bors commented on c6633fd Sep 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on c6633fd Sep 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging thestinger/rust/large_address_aware = c6633fd into auto

@bors
Copy link
Contributor

@bors bors commented on c6633fd Sep 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thestinger/rust/large_address_aware = c6633fd merged ok, testing candidate = 5c39879

@bors
Copy link
Contributor

@bors bors commented on c6633fd Sep 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 5c39879

Please sign in to comment.