Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:16

0001 //===- ELFConfig.h ----------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_OBJCOPY_ELF_ELFCONFIG_H
0010 #define LLVM_OBJCOPY_ELF_ELFCONFIG_H
0011 
0012 #include "llvm/ObjCopy/CommonConfig.h"
0013 #include "llvm/Object/ELFTypes.h"
0014 
0015 namespace llvm {
0016 namespace objcopy {
0017 
0018 // Note to remove info specified by --remove-note option.
0019 struct RemoveNoteInfo {
0020   StringRef Name;
0021   uint32_t TypeId;
0022 };
0023 
0024 // ELF specific configuration for copying/stripping a single file.
0025 struct ELFConfig {
0026   uint8_t NewSymbolVisibility = (uint8_t)ELF::STV_DEFAULT;
0027 
0028   std::vector<std::pair<NameMatcher, uint8_t>> SymbolsToSetVisibility;
0029 
0030   // ELF entry point address expression. The input parameter is an entry point
0031   // address in the input ELF file. The entry address in the output file is
0032   // calculated with EntryExpr(input_address), when either --set-start or
0033   // --change-start is used.
0034   std::function<uint64_t(uint64_t)> EntryExpr;
0035 
0036   bool AllowBrokenLinks = false;
0037   bool KeepFileSymbols = false;
0038   bool LocalizeHidden = false;
0039   bool VerifyNoteSections = true;
0040 
0041   // Notes specified by --remove-note option.
0042   SmallVector<RemoveNoteInfo, 0> NotesToRemove;
0043 };
0044 
0045 } // namespace objcopy
0046 } // namespace llvm
0047 
0048 #endif // LLVM_OBJCOPY_ELF_ELFCONFIG_H