mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1496179 - Make mozglue.dll a private SxS assembly. r=aklotz,froydnj
SxS assemblies do not obey the usual DLL search order. It will make it possible to load mozglue.dll from appdir even if the PreferSystem32Images mitigation is enabled and System32 has a random mozglue.dll.
This commit is contained in:
parent
771886a06d
commit
f38cdcfbf1
@ -19,6 +19,16 @@
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="mozglue"
|
||||
version="1.0.0.0"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<ms_asmv3:security>
|
||||
<ms_asmv3:requestedPrivileges>
|
||||
|
@ -274,12 +274,14 @@ print RCFILE qq{
|
||||
|
||||
my $versionlevel=0;
|
||||
my $insideversion=0;
|
||||
my $has_manifest=0;
|
||||
if (open(RCINCLUDE, "<$rcinclude"))
|
||||
{
|
||||
print RCFILE "// From included resource $rcinclude\n";
|
||||
# my $mstring="";
|
||||
while (<RCINCLUDE>)
|
||||
{
|
||||
$has_manifest = 1 if /^1 (24|RT_MANIFEST) "$binary.manifest"/;
|
||||
$_ =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g;
|
||||
print RCFILE $_;
|
||||
# my $instr=$_;
|
||||
@ -330,6 +332,10 @@ if (open(RCINCLUDE, "<$rcinclude"))
|
||||
|
||||
my $fileflags = join(' | ', @fileflags);
|
||||
|
||||
print RCFILE qq{
|
||||
1 RT_MANIFEST "$binary.manifest"
|
||||
} if !$has_manifest && $binary =~ /\.exe$/ && -e "$objdir/$binary.manifest";
|
||||
|
||||
print RCFILE qq{
|
||||
|
||||
|
||||
|
@ -18,6 +18,16 @@
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="mozglue"
|
||||
version="1.0.0.0"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<ms_asmv3:security>
|
||||
|
@ -12,6 +12,16 @@
|
||||
type="win32"
|
||||
/>
|
||||
<description>XPConnect Shell</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="mozglue"
|
||||
version="1.0.0.0"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<ms_asmv3:security>
|
||||
<ms_asmv3:requestedPrivileges>
|
||||
|
@ -11,6 +11,12 @@ mozglue.def: mozglue.def.in $(GLOBAL_DEPS)
|
||||
$(call py_action,preprocessor,$(if $(MOZ_REPLACE_MALLOC),-DMOZ_REPLACE_MALLOC) $(ACDEFINES) $< -o $@)
|
||||
|
||||
GARBAGE += mozglue.def
|
||||
|
||||
# Rebuild mozglue.dll if the manifest changes - it's included by mozglue.rc.
|
||||
# (this dependency should really be just for mozglue.dll, not other targets)
|
||||
# Note the manifest file exists in the tree, so we use the explicit filename
|
||||
# here.
|
||||
EXTRA_DEPS += mozglue.dll.manifest
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/mozglue/build/replace_malloc.mk
|
||||
|
@ -35,6 +35,7 @@ if CONFIG['OS_TARGET'] == 'WINNT':
|
||||
DELAYLOAD_DLLS += [
|
||||
'user32.dll',
|
||||
]
|
||||
RCINCLUDE = 'mozglue.rc'
|
||||
|
||||
if CONFIG['MOZ_PGO'] and CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
SOURCES += ['cygprofile.cpp']
|
||||
|
9
mozglue/build/mozglue.dll.manifest
Normal file
9
mozglue/build/mozglue.dll.manifest
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
name="mozglue"
|
||||
type="win32"
|
||||
/>
|
||||
<file name="mozglue.dll"/>
|
||||
</assembly>
|
6
mozglue/build/mozglue.rc
Normal file
6
mozglue/build/mozglue.rc
Normal file
@ -0,0 +1,6 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
1 RT_MANIFEST "mozglue.dll.manifest"
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="*"
|
||||
name="pingsender"
|
||||
type="win32"
|
||||
/>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="mozglue"
|
||||
version="1.0.0.0"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="*"
|
||||
name="minidump-analyzer"
|
||||
type="win32"
|
||||
/>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="mozglue"
|
||||
version="1.0.0.0"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
Loading…
Reference in New Issue
Block a user