Skip to content

Commit

Permalink
No more custom base address in 'mozc_tip{32,64}.dll'
Browse files Browse the repository at this point in the history
With Address Space Layout Randomization (ASLR), specifying unique base
address to DLLs at the link time is no longer recommended [1].

Actually we are currently seeing in the following warning when building
Mozc for Windows.

  [456/457] LINK_EMBED(DLL) mozc_tip64.dll
  LINK : warning LNK4281: undesirable base address 0x6000000 for x64
  image; set base address above 4GB for best ASLR optimization

Let's drop our custom 'BaseAddress' settings from 'mozc_tip{32,64}.dll'
to let the linker set the recommended value.

There must be no user observable behavior change anyway.

Closes #834.

 [1]: https://learn.microsoft.com/en-us/cpp/build/reference/base-base-address#remarks

PiperOrigin-RevId: 576203953
  • Loading branch information
yukawa authored and hiroyuki-komatsu committed Oct 24, 2023
1 parent 1fc9c97 commit 2be7e1d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/win32/tip/tip.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@
'gen_mozc_tip_resource_header',
'tip_core',
],
'msvs_settings': {
'VCLinkerTool': {
'BaseAddress': '0x06000000',
},
},
},
{
'target_name': 'mozc_tip64',
Expand All @@ -171,9 +166,6 @@
'tip_core',
],
'msvs_settings': {
'VCLinkerTool': {
'BaseAddress': '0x06000000',
},
'VCManifestTool': {
'EmbedManifest': 'true',
},
Expand Down

0 comments on commit 2be7e1d

Please sign in to comment.