ELFConfig.h 1.2 KB

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