1 //===- ELFConfig.h ----------------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_OBJCOPY_ELFCONFIG_H
10 #define LLVM_TOOLS_OBJCOPY_ELFCONFIG_H
12 #include "llvm/ADT/Optional.h"
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/Object/ELFTypes.h"
15 #include "llvm/Support/Error.h"
24 struct NewSymbolInfo
{
26 StringRef SectionName
;
28 uint8_t Type
= ELF::STT_NOTYPE
;
29 uint8_t Bind
= ELF::STB_GLOBAL
;
30 uint8_t Visibility
= ELF::STV_DEFAULT
;
33 struct ELFCopyConfig
{
34 Optional
<uint8_t> NewSymbolVisibility
;
35 std::vector
<NewSymbolInfo
> SymbolsToAdd
;
38 Expected
<ELFCopyConfig
> parseConfig(const CopyConfig
&Config
);
41 } // namespace objcopy