forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chrome_elf.dll is shipped in Chrome's version directory to ease updates, and is loaded early in chrome.exe's lifetime by making it a private assembly in a subfolder of chrome.exe's folder (see http://msdn.microsoft.com/library/aa374224.aspx). BUG= http://crosbug.com/p/23889 Review URL: https://codereview.chromium.org/53793002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234795 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
caitkp@chromium.org
committed
Nov 13, 2013
1 parent
a644bc1
commit 91f0755
Showing
17 changed files
with
201 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include_rules = [ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
caitkp@chromium.org | ||
gab@chromium.org | ||
robertshield@chromium.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Chrome Early Loading Framework (aka ChromeELF) | ||
|
||
chrome_elf.dll is shipped in Chrome's version directory to ease updates, | ||
and is loaded early in chrome.exe's lifetime. This is done by turning the | ||
version directory into a private assembly which refers to chrome_elf.dll | ||
(http://msdn.microsoft.com/library/aa374224.aspx). | ||
|
||
In an ideal world, this would be done by embedding an application config in | ||
chrome.exe that would refer to the proper version directory via a | ||
probing\privatePath attribute (http://msdn.microsoft.com/library/aa374182.aspx). | ||
This would allow us to refer to dlls in the version directory without having to | ||
make the version directory itself into an assembly. It would also avoid naming | ||
conflicts (as the WinSxS dir and GAC both take precedence over private | ||
assemblies when searching for dlls). Unfortunately, the probing\privatePath | ||
attribute is only supported for Windows 7 and later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
LIBRARY "chrome_elf.dll" | ||
|
||
EXPORTS | ||
InitChromeElf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright 2013 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
{ | ||
'variables': { | ||
'chromium_code': 1, | ||
}, | ||
'includes': [ | ||
'../build/win_precompile.gypi', | ||
'../chrome/version.gypi', | ||
], | ||
'targets': [ | ||
{ | ||
'target_name': 'chrome_elf', | ||
'type': 'shared_library', | ||
'include_dirs': [ | ||
'..', | ||
], | ||
'sources': [ | ||
'chrome_elf.def', | ||
'chrome_elf_main.cc', | ||
'chrome_elf_main.h', | ||
], | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include <windows.h> | ||
|
||
#include "chrome_elf/chrome_elf_main.h" | ||
|
||
void InitChromeElf() { | ||
// This method is a no-op which may be called to force a load-time dependency | ||
// on chrome_elf.dll. | ||
} | ||
|
||
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) { | ||
return TRUE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROME_ELF_CHROME_ELF_MAIN_H_ | ||
#define CHROME_ELF_CHROME_ELF_MAIN_H_ | ||
|
||
extern "C" void InitChromeElf(); | ||
|
||
#endif // CHROME_ELF_CHROME_ELF_MAIN_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | ||
<dependency> | ||
<dependentAssembly> | ||
<assemblyIdentity type='win32' | ||
name='@MAJOR@.@MINOR@.@BUILD@.@PATCH@' | ||
version='@MAJOR@.@MINOR@.@BUILD@.@PATCH@' language='*'/> | ||
</dependentAssembly> | ||
</dependency> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2013 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
# This file contains an action which can be used to construct a manifest file | ||
# declaring a dependency on chrome_elf.dll. This manifest can then be merged | ||
# into the manifest of the executable and embedded into it when it is built. | ||
|
||
# To use this the following variables need to be defined: | ||
# version_path: string: path to file containing version data (e.g. | ||
# chrome/VERSION). | ||
# version_py_path: string: path to file containing version script (e.g. | ||
# chrome/tools/build/version.py). | ||
|
||
{ | ||
'variables': { | ||
'template_input_path': | ||
'<(DEPTH)/chrome_elf/chrome_exe_manifest.template', | ||
}, | ||
'inputs': [ | ||
'<(template_input_path)', | ||
'<(version_path)', | ||
], | ||
'outputs': [ | ||
'<(SHARED_INTERMEDIATE_DIR)/chrome_elf/version_assembly.manifest', | ||
], | ||
'action': [ | ||
'python', '<(version_py_path)', | ||
'-f', '<(version_path)', | ||
'<(template_input_path)', | ||
'<@(_outputs)', | ||
], | ||
'message': 'Generating <@(_outputs)', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<assembly | ||
xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> | ||
<assemblyIdentity | ||
name='@MAJOR@.@MINOR@.@BUILD@.@PATCH@' | ||
version='@MAJOR@.@MINOR@.@BUILD@.@PATCH@' | ||
type='win32'/> | ||
<file name='chrome_elf.dll'/> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright 2013 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
# This file contains an action which can be used to construct a manifest file | ||
# with the same name as the version directory so that chrome.exe identifies the | ||
# version directory as an assembly. This will be copied over to the version | ||
# directory by the installer script. | ||
|
||
# To use this the following variables need to be defined: | ||
# version_path: string: path to file containing version data (e.g. | ||
# chrome/VERSION). | ||
# version_py_path: string: path to file containing version script (e.g. | ||
# chrome/tools/build/version.py). | ||
# version_full: string: version string in W.X.Y.Z form. | ||
|
||
|
||
{ | ||
'variables': { | ||
'template_input_path': | ||
'<(DEPTH)/chrome_elf/version_assembly_manifest.template', | ||
}, | ||
'inputs': [ | ||
'<(template_input_path)', | ||
'<(version_path)', | ||
], | ||
'outputs': [ | ||
'<(PRODUCT_DIR)/<(version_full).manifest', | ||
], | ||
'action': [ | ||
'python', '<(version_py_path)', | ||
'-f', '<(version_path)', | ||
'<(template_input_path)', | ||
'<@(_outputs)', | ||
], | ||
'message': 'Generating <@(_outputs)', | ||
} |