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/Object/ELFTypes.h"
13
14namespace llvm {
15namespace objcopy {
16
17// ELF specific configuration for copying/stripping a single file.
18struct ELFConfig {
19  uint8_t NewSymbolVisibility = (uint8_t)ELF::STV_DEFAULT;
20
21  // ELF entry point address expression. The input parameter is an entry point
22  // address in the input ELF file. The entry address in the output file is
23  // calculated with EntryExpr(input_address), when either --set-start or
24  // --change-start is used.
25  std::function<uint64_t(uint64_t)> EntryExpr;
26
27  bool AllowBrokenLinks = false;
28  bool KeepFileSymbols = false;
29  bool LocalizeHidden = false;
30};
31
32} // namespace objcopy
33} // namespace llvm
34
35#endif // LLVM_OBJCOPY_ELF_ELFCONFIG_H
36