diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-02 23:08:02 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-02 23:08:02 +0000 |
commit | 66decf4a77220e18665f2ef5145e3de0c4e9b433 (patch) | |
tree | 46f0ac758d699529225b59e494880f1446df4f68 /chrome_elf | |
parent | ec2ce925500cd6ce9d5b539594fbe46f153e6aff (diff) | |
download | chromium_src-66decf4a77220e18665f2ef5145e3de0c4e9b433.zip chromium_src-66decf4a77220e18665f2ef5145e3de0c4e9b433.tar.gz chromium_src-66decf4a77220e18665f2ef5145e3de0c4e9b433.tar.bz2 |
Don't use the in-image section in chrome_elf on VS2012 or above.
As per the bug, writeable executable sections appear not to be supported on VS2012 and up (or at least they cause a warning to be emitted). Disable them temporarily on those versions until I figure out whether they are still generated as desired.
BUG=330435
TEST=NONE
Review URL: https://codereview.chromium.org/122773002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_elf')
-rw-r--r-- | chrome_elf/blacklist/blacklist.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome_elf/blacklist/blacklist.cc b/chrome_elf/blacklist/blacklist.cc index f87c41a..15f0acf 100644 --- a/chrome_elf/blacklist/blacklist.cc +++ b/chrome_elf/blacklist/blacklist.cc @@ -27,10 +27,11 @@ const wchar_t kRegistryBeaconPath[] = L"SOFTWARE\\Google\\Chrome\\BLBeacon"; // Allocate storage for thunks in a RWX page of this module to save on doing // an extra allocation at run time. -#if !defined(_WIN64) -// 64-bit images appear to not support writeable and executable pages. +#if !defined(_WIN64) && (_MSC_VER < 1700) +// 64-bit images or images generated with 2012 and above appear to not support +// writeable and executable pages. // This would yield compile warning C4330. -// TODO(robertshield): Add 64 bit support. +// TODO(robertshield): Figure out how / if to do this on 2012. #pragma section(".crthunk",read,write,execute) __declspec(allocate(".crthunk")) sandbox::ThunkData g_thunk_storage; #endif @@ -249,7 +250,7 @@ bool Initialize(bool force) { } #endif -#if defined(_WIN64) +#if defined(_WIN64) || (_MSC_VER >= 1700) BYTE* thunk_storage = new BYTE[sizeof(sandbox::ThunkData)]; #else BYTE* thunk_storage = reinterpret_cast<BYTE*>(&g_thunk_storage); |