ELFConfig.h 1.3 KB

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