1 : // Copyright 2014 Google Inc. All Rights Reserved.
2 : //
3 : // Licensed under the Apache License, Version 2.0 (the "License");
4 : // you may not use this file except in compliance with the License.
5 : // You may obtain a copy of the License at
6 : //
7 : // http://www.apache.org/licenses/LICENSE-2.0
8 : //
9 : // Unless required by applicable law or agreed to in writing, software
10 : // distributed under the License is distributed on an "AS IS" BASIS,
11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 : // See the License for the specific language governing permissions and
13 : // limitations under the License.
14 :
15 : #ifndef SYZYGY_AR_UNITTEST_UTIL_H_
16 : #define SYZYGY_AR_UNITTEST_UTIL_H_
17 :
18 m : namespace testing {
19 :
20 : // A 'src' relative path to a sample .lib file.
21 m : extern const wchar_t kArchiveFile[];
22 : // The number of files in the .lib archive.
23 m : const size_t kArchiveFileCount = 15u;
24 : // The number of symbols in the .lib archive.
25 m : const size_t kArchiveSymbolCount = 86u;
26 :
27 : // A 'src' relative path to a sample .lib file containing weak external
28 : // symbols. This archive also contains no filename table, and has inline
29 : // file names. The content of the first object file was generated by
30 : // compiling the following MASM source:
31 : //
32 : // .model small
33 : // .data
34 : // x_weak = 1
35 : // public x_weak
36 : // extern x(x_weak):abs
37 : // END
38 : //
39 : // The second object file was generated from the code:
40 : //
41 : // .model small
42 : // .data
43 : // x = 1
44 : // public x
45 : // extern x:abs
46 : // END
47 : //
48 : // The first object file provides a weak definition of the symbol 'x', and a
49 : // non-weak definition for 'x_weak'. The second object file provides a non-weak
50 : // definition of 'x', which should override the definition from the first
51 : // file.
52 m : extern const wchar_t kWeakSymbolArchiveFile[];
53 : // The number of files in the weak symbol library.
54 m : const size_t kWeakSymbolArchiveFileCount = 2u;
55 : // The number of symbols in the weak symbol library.
56 m : const size_t kWeakSymbolArchiveSymbolCount = 2u;
57 :
58 : // An archive containing multiple files stored with the same name.
59 m : extern const wchar_t kDuplicatesArchiveFile[];
60 :
61 : // An archive containing empty/deleted file indices in the symbol table.
62 m : extern const wchar_t kEmptyFilesArchiveFile[];
63 :
64 m : } // namespace testing
65 :
66 : #endif // SYZYGY_AR_UNITTEST_UTIL_H_
|