1 | //===- ELFConfig.h ----------------------------------------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLVM_OBJCOPY_ELF_ELFCONFIG_H |
10 | #define LLVM_OBJCOPY_ELF_ELFCONFIG_H |
11 | |
12 | #include "llvm/ObjCopy/CommonConfig.h" |
13 | #include "llvm/Object/ELFTypes.h" |
14 | |
15 | namespace llvm { |
16 | namespace objcopy { |
17 | |
18 | // ELF specific configuration for copying/stripping a single file. |
19 | struct ELFConfig { |
20 | uint8_t NewSymbolVisibility = (uint8_t)ELF::STV_DEFAULT; |
21 | |
22 | std::vector<std::pair<NameMatcher, uint8_t>> SymbolsToSetVisibility; |
23 | |
24 | // ELF entry point address expression. The input parameter is an entry point |
25 | // address in the input ELF file. The entry address in the output file is |
26 | // calculated with EntryExpr(input_address), when either --set-start or |
27 | // --change-start is used. |
28 | std::function<uint64_t(uint64_t)> EntryExpr; |
29 | |
30 | bool AllowBrokenLinks = false; |
31 | bool KeepFileSymbols = false; |
32 | bool LocalizeHidden = false; |
33 | bool VerifyNoteSections = true; |
34 | }; |
35 | |
36 | } // namespace objcopy |
37 | } // namespace llvm |
38 | |
39 | #endif // LLVM_OBJCOPY_ELF_ELFCONFIG_H |
40 | |