OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdint.h> | 5 #include <stdint.h> |
6 #include <windows.h> | 6 #include <windows.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 "MSVC*.dll", | 81 "MSVC*.dll", |
82 "VCRUNTIME*.dll", | 82 "VCRUNTIME*.dll", |
83 "api-ms-win-crt-*.dll", | 83 "api-ms-win-crt-*.dll", |
84 #endif | 84 #endif |
85 #if defined(SYZYASAN) | 85 #if defined(SYZYASAN) |
86 "syzyasan_rtl.dll", | 86 "syzyasan_rtl.dll", |
87 #endif | 87 #endif |
88 #if defined(ADDRESS_SANITIZER) && defined(COMPONENT_BUILD) | 88 #if defined(ADDRESS_SANITIZER) && defined(COMPONENT_BUILD) |
89 "clang_rt.asan_dynamic-i386.dll", | 89 "clang_rt.asan_dynamic-i386.dll", |
90 #endif | 90 #endif |
91 "ADVAPI32.dll" | 91 "ADVAPI32.dll", |
| 92 // On 64 bit the Version API's like VerQueryValue come from VERSION.dll. |
| 93 // It depends on kernel32, advapi32 and api-ms-win-crt*.dll. This should |
| 94 // be ok. |
| 95 "VERSION.dll", |
92 }; | 96 }; |
93 | 97 |
94 // Make sure all of ELF's imports are in the valid imports list. | 98 // Make sure all of ELF's imports are in the valid imports list. |
95 for (const std::string& import : elf_imports) { | 99 for (const std::string& import : elf_imports) { |
96 bool match = false; | 100 bool match = false; |
97 for (const char* kValidFilePattern : kValidFilePatterns) { | 101 for (const char* kValidFilePattern : kValidFilePatterns) { |
98 if (base::MatchPattern(import, kValidFilePattern)) { | 102 if (base::MatchPattern(import, kValidFilePattern)) { |
99 match = true; | 103 match = true; |
100 break; | 104 break; |
101 } | 105 } |
(...skipping 15 matching lines...) Expand all Loading... |
117 ASSERT_LT(0u, exe_imports.size()) << "Ensure the chrome_elf_unittests " | 121 ASSERT_LT(0u, exe_imports.size()) << "Ensure the chrome_elf_unittests " |
118 "target was built, instead of chrome_elf_unittests.exe"; | 122 "target was built, instead of chrome_elf_unittests.exe"; |
119 | 123 |
120 // Chrome.exe's first import must be ELF. | 124 // Chrome.exe's first import must be ELF. |
121 EXPECT_EQ("chrome_elf.dll", exe_imports[0]) << | 125 EXPECT_EQ("chrome_elf.dll", exe_imports[0]) << |
122 "Illegal import order in chrome.exe (ensure the chrome_elf_unittest " | 126 "Illegal import order in chrome.exe (ensure the chrome_elf_unittest " |
123 "target was built, instead of just chrome_elf_unittests.exe)"; | 127 "target was built, instead of just chrome_elf_unittests.exe)"; |
124 } | 128 } |
125 | 129 |
126 } // namespace | 130 } // namespace |
OLD | NEW |