Skip to content

Commit

Permalink
Fix prefered base addresses on win64
Browse files Browse the repository at this point in the history
We need a +4GB base so the loader will randomize above 4GB.

BUG=361670
R=robertshield@chromium.org,jam@chromium.org
NOTRY=TRUE

Review URL: https://codereview.chromium.org/233413008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263540 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jschuh@chromium.org committed Apr 12, 2014
1 parent 16d2abe commit 6980af2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion chrome/chrome_dll.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
},
'msvs_settings': {
'VCLinkerTool': {
'BaseAddress': '0x01c30000',
'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
# Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
'SubSystem': '2',
Expand All @@ -154,6 +153,8 @@
'UseLibraryDependencyInputs': "true",
}],
['target_arch=="ia32"', {
# Don't set an x64 base address (to avoid breaking HE-ASLR).
'BaseAddress': '0x01c30000',
# Link against the XP-constrained user32 import library
# instead of the platform-SDK provided one to avoid
# inadvertently taking dependencies on post-XP user32
Expand Down
14 changes: 12 additions & 2 deletions chrome_elf/chrome_elf.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@
],
'msvs_settings': {
'VCLinkerTool': {
'BaseAddress': '0x01c20000',
'conditions': [
['target_arch=="ia32"', {
# Don't set an x64 base address (to avoid breaking HE-ASLR).
'BaseAddress': '0x01c20000',
}],
],
# Set /SUBSYSTEM:WINDOWS.
'SubSystem': '2',
'AdditionalDependencies!': [
Expand Down Expand Up @@ -192,7 +197,12 @@
],
'msvs_settings': {
'VCLinkerTool': {
'BaseAddress': '0x01c10000',
'conditions': [
['target_arch=="ia32"', {
# Don't set an x64 base address (to avoid breaking HE-ASLR).
'BaseAddress': '0x01c20000',
}],
],
# Set /SUBSYSTEM:WINDOWS.
'SubSystem': '2',
},
Expand Down

0 comments on commit 6980af2

Please sign in to comment.