Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 1 | //===- CopyConfig.h -------------------------------------------------------===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_TOOLS_LLVM_OBJCOPY_COPY_CONFIG_H |
| 10 | #define LLVM_TOOLS_LLVM_OBJCOPY_COPY_CONFIG_H |
| 11 | |
Seiya Nuta | c83eefc | 2019-09-24 09:38:23 +0000 | [diff] [blame] | 12 | #include "ELF/ELFConfig.h" |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 13 | #include "llvm/ADT/ArrayRef.h" |
Jordan Rupprecht | bd95a9f | 2019-03-28 18:27:00 +0000 | [diff] [blame] | 14 | #include "llvm/ADT/BitmaskEnum.h" |
Alexander Shaposhnikov | d332ec9 | 2020-06-22 16:49:14 -0700 | [diff] [blame] | 15 | #include "llvm/ADT/DenseSet.h" |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 16 | #include "llvm/ADT/Optional.h" |
| 17 | #include "llvm/ADT/SmallVector.h" |
| 18 | #include "llvm/ADT/StringMap.h" |
| 19 | #include "llvm/ADT/StringRef.h" |
Eugene Leviant | 51c1f64 | 2019-02-25 14:12:41 +0000 | [diff] [blame] | 20 | #include "llvm/Object/ELFTypes.h" |
Jordan Rupprecht | 5745c5f | 2019-02-04 18:38:00 +0000 | [diff] [blame] | 21 | #include "llvm/Support/Allocator.h" |
Jordan Rupprecht | ad29d29 | 2019-02-21 17:05:19 +0000 | [diff] [blame] | 22 | #include "llvm/Support/Error.h" |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 23 | #include "llvm/Support/GlobPattern.h" |
Eugene Leviant | f324f6d | 2019-02-06 11:00:07 +0000 | [diff] [blame] | 24 | #include "llvm/Support/Regex.h" |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 25 | // Necessary for llvm::DebugCompressionType::None |
| 26 | #include "llvm/Target/TargetOptions.h" |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 27 | #include <vector> |
| 28 | |
| 29 | namespace llvm { |
| 30 | namespace objcopy { |
| 31 | |
Seiya Nuta | ecb60b7 | 2019-07-05 05:28:38 +0000 | [diff] [blame] | 32 | enum class FileFormat { |
| 33 | Unspecified, |
| 34 | ELF, |
| 35 | Binary, |
| 36 | IHex, |
| 37 | }; |
| 38 | |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 39 | // This type keeps track of the machine info for various architectures. This |
| 40 | // lets us map architecture names to ELF types and the e_machine value of the |
| 41 | // ELF file. |
| 42 | struct MachineInfo { |
Jordan Rupprecht | b0b65ca | 2019-04-17 07:42:31 +0000 | [diff] [blame] | 43 | MachineInfo(uint16_t EM, uint8_t ABI, bool Is64, bool IsLittle) |
| 44 | : EMachine(EM), OSABI(ABI), Is64Bit(Is64), IsLittleEndian(IsLittle) {} |
| 45 | // Alternative constructor that defaults to NONE for OSABI. |
| 46 | MachineInfo(uint16_t EM, bool Is64, bool IsLittle) |
| 47 | : MachineInfo(EM, ELF::ELFOSABI_NONE, Is64, IsLittle) {} |
| 48 | // Default constructor for unset fields. |
| 49 | MachineInfo() : MachineInfo(0, 0, false, false) {} |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 50 | uint16_t EMachine; |
James Henderson | c040d5d | 2019-03-22 10:21:09 +0000 | [diff] [blame] | 51 | uint8_t OSABI; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 52 | bool Is64Bit; |
| 53 | bool IsLittleEndian; |
| 54 | }; |
| 55 | |
Jordan Rupprecht | bd95a9f | 2019-03-28 18:27:00 +0000 | [diff] [blame] | 56 | // Flags set by --set-section-flags or --rename-section. Interpretation of these |
| 57 | // is format-specific and not all flags are meaningful for all object file |
| 58 | // formats. This is a bitmask; many section flags may be set. |
| 59 | enum SectionFlag { |
| 60 | SecNone = 0, |
| 61 | SecAlloc = 1 << 0, |
| 62 | SecLoad = 1 << 1, |
| 63 | SecNoload = 1 << 2, |
| 64 | SecReadonly = 1 << 3, |
| 65 | SecDebug = 1 << 4, |
| 66 | SecCode = 1 << 5, |
| 67 | SecData = 1 << 6, |
| 68 | SecRom = 1 << 7, |
| 69 | SecMerge = 1 << 8, |
| 70 | SecStrings = 1 << 9, |
| 71 | SecContents = 1 << 10, |
| 72 | SecShare = 1 << 11, |
Sergey Dmitriev | e446322 | 2020-01-20 17:06:03 -0800 | [diff] [blame] | 73 | SecExclude = 1 << 12, |
| 74 | LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/SecExclude) |
Jordan Rupprecht | bd95a9f | 2019-03-28 18:27:00 +0000 | [diff] [blame] | 75 | }; |
| 76 | |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 77 | struct SectionRename { |
| 78 | StringRef OriginalName; |
| 79 | StringRef NewName; |
Jordan Rupprecht | bd95a9f | 2019-03-28 18:27:00 +0000 | [diff] [blame] | 80 | Optional<SectionFlag> NewFlags; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 81 | }; |
| 82 | |
Jordan Rupprecht | c892741 | 2019-01-29 15:05:38 +0000 | [diff] [blame] | 83 | struct SectionFlagsUpdate { |
| 84 | StringRef Name; |
Jordan Rupprecht | bd95a9f | 2019-03-28 18:27:00 +0000 | [diff] [blame] | 85 | SectionFlag NewFlags; |
Jordan Rupprecht | c892741 | 2019-01-29 15:05:38 +0000 | [diff] [blame] | 86 | }; |
| 87 | |
Jordan Rupprecht | d0f7bcf | 2019-01-30 14:58:13 +0000 | [diff] [blame] | 88 | enum class DiscardType { |
| 89 | None, // Default |
| 90 | All, // --discard-all (-x) |
| 91 | Locals, // --discard-locals (-X) |
| 92 | }; |
| 93 | |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 94 | enum class MatchStyle { |
| 95 | Literal, // Default for symbols. |
| 96 | Wildcard, // Default for sections, or enabled with --wildcard (-w). |
| 97 | Regex, // Enabled with --regex. |
| 98 | }; |
| 99 | |
| 100 | class NameOrPattern { |
Eugene Leviant | f324f6d | 2019-02-06 11:00:07 +0000 | [diff] [blame] | 101 | StringRef Name; |
| 102 | // Regex is shared between multiple CopyConfig instances. |
| 103 | std::shared_ptr<Regex> R; |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 104 | std::shared_ptr<GlobPattern> G; |
| 105 | bool IsPositiveMatch = true; |
| 106 | |
| 107 | NameOrPattern(StringRef N) : Name(N) {} |
| 108 | NameOrPattern(std::shared_ptr<Regex> R) : R(R) {} |
| 109 | NameOrPattern(std::shared_ptr<GlobPattern> G, bool IsPositiveMatch) |
| 110 | : G(G), IsPositiveMatch(IsPositiveMatch) {} |
Eugene Leviant | f324f6d | 2019-02-06 11:00:07 +0000 | [diff] [blame] | 111 | |
| 112 | public: |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 113 | // ErrorCallback is used to handle recoverable errors. An Error returned |
| 114 | // by the callback aborts the parsing and is then returned by this function. |
| 115 | static Expected<NameOrPattern> |
| 116 | create(StringRef Pattern, MatchStyle MS, |
| 117 | llvm::function_ref<Error(Error)> ErrorCallback); |
| 118 | |
| 119 | bool isPositiveMatch() const { return IsPositiveMatch; } |
| 120 | bool operator==(StringRef S) const { |
| 121 | return R ? R->match(S) : G ? G->match(S) : Name == S; |
| 122 | } |
Eugene Leviant | f324f6d | 2019-02-06 11:00:07 +0000 | [diff] [blame] | 123 | bool operator!=(StringRef S) const { return !operator==(S); } |
| 124 | }; |
| 125 | |
Jordan Rupprecht | 6c6dd6a | 2019-08-22 19:17:50 +0000 | [diff] [blame] | 126 | // Matcher that checks symbol or section names against the command line flags |
| 127 | // provided for that option. |
| 128 | class NameMatcher { |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 129 | std::vector<NameOrPattern> PosMatchers; |
| 130 | std::vector<NameOrPattern> NegMatchers; |
Jordan Rupprecht | 6c6dd6a | 2019-08-22 19:17:50 +0000 | [diff] [blame] | 131 | |
| 132 | public: |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 133 | Error addMatcher(Expected<NameOrPattern> Matcher) { |
| 134 | if (!Matcher) |
| 135 | return Matcher.takeError(); |
| 136 | if (Matcher->isPositiveMatch()) |
| 137 | PosMatchers.push_back(std::move(*Matcher)); |
| 138 | else |
| 139 | NegMatchers.push_back(std::move(*Matcher)); |
| 140 | return Error::success(); |
Jordan Rupprecht | 6c6dd6a | 2019-08-22 19:17:50 +0000 | [diff] [blame] | 141 | } |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 142 | bool matches(StringRef S) const { |
| 143 | return is_contained(PosMatchers, S) && !is_contained(NegMatchers, S); |
| 144 | } |
| 145 | bool empty() const { return PosMatchers.empty() && NegMatchers.empty(); } |
Jordan Rupprecht | 6c6dd6a | 2019-08-22 19:17:50 +0000 | [diff] [blame] | 146 | }; |
| 147 | |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 148 | // Configuration for copying/stripping a single file. |
| 149 | struct CopyConfig { |
Seiya Nuta | c83eefc | 2019-09-24 09:38:23 +0000 | [diff] [blame] | 150 | // Format-specific options to be initialized lazily when needed. |
| 151 | Optional<elf::ELFCopyConfig> ELF; |
| 152 | |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 153 | // Main input/output options |
| 154 | StringRef InputFilename; |
Alexander Shaposhnikov | c54959c | 2019-11-19 23:30:52 -0800 | [diff] [blame] | 155 | FileFormat InputFormat = FileFormat::Unspecified; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 156 | StringRef OutputFilename; |
Alexander Shaposhnikov | c54959c | 2019-11-19 23:30:52 -0800 | [diff] [blame] | 157 | FileFormat OutputFormat = FileFormat::Unspecified; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 158 | |
Jordan Rupprecht | 70038e0 | 2019-01-07 16:59:12 +0000 | [diff] [blame] | 159 | // Only applicable when --output-format!=binary (e.g. elf64-x86-64). |
| 160 | Optional<MachineInfo> OutputArch; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 161 | |
| 162 | // Advanced options |
| 163 | StringRef AddGnuDebugLink; |
James Henderson | 9df3883 | 2019-05-14 10:59:04 +0000 | [diff] [blame] | 164 | // Cached gnu_debuglink's target CRC |
| 165 | uint32_t GnuDebugLinkCRC32; |
Jake Ehrlich | 8ad7779 | 2018-12-03 19:49:23 +0000 | [diff] [blame] | 166 | StringRef BuildIdLinkDir; |
| 167 | Optional<StringRef> BuildIdLinkInput; |
| 168 | Optional<StringRef> BuildIdLinkOutput; |
Peter Collingbourne | 8d58a98 | 2019-06-07 17:57:48 +0000 | [diff] [blame] | 169 | Optional<StringRef> ExtractPartition; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 170 | StringRef SplitDWO; |
| 171 | StringRef SymbolsPrefix; |
James Henderson | fa11fb3 | 2019-05-08 09:49:35 +0000 | [diff] [blame] | 172 | StringRef AllocSectionsPrefix; |
Jordan Rupprecht | d0f7bcf | 2019-01-30 14:58:13 +0000 | [diff] [blame] | 173 | DiscardType DiscardMode = DiscardType::None; |
Seiya Nuta | c83eefc | 2019-09-24 09:38:23 +0000 | [diff] [blame] | 174 | Optional<StringRef> NewSymbolVisibility; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 175 | |
| 176 | // Repeated options |
| 177 | std::vector<StringRef> AddSection; |
| 178 | std::vector<StringRef> DumpSection; |
Seiya Nuta | c83eefc | 2019-09-24 09:38:23 +0000 | [diff] [blame] | 179 | std::vector<StringRef> SymbolsToAdd; |
Alexander Shaposhnikov | c54959c | 2019-11-19 23:30:52 -0800 | [diff] [blame] | 180 | std::vector<StringRef> RPathToAdd; |
Keith Smiley | 77cbf25 | 2020-10-23 15:00:25 -0700 | [diff] [blame] | 181 | std::vector<StringRef> RPathToPrepend; |
Sameer Arora | 3b5db7f | 2020-07-06 14:53:24 -0700 | [diff] [blame] | 182 | DenseMap<StringRef, StringRef> RPathsToUpdate; |
| 183 | DenseMap<StringRef, StringRef> InstallNamesToUpdate; |
Alexander Shaposhnikov | d332ec9 | 2020-06-22 16:49:14 -0700 | [diff] [blame] | 184 | DenseSet<StringRef> RPathsToRemove; |
Jordan Rupprecht | 6c6dd6a | 2019-08-22 19:17:50 +0000 | [diff] [blame] | 185 | |
Sameer Arora | ca518c4 | 2020-06-30 11:01:45 -0700 | [diff] [blame] | 186 | // install-name-tool's id option |
| 187 | Optional<StringRef> SharedLibId; |
| 188 | |
Jordan Rupprecht | 6c6dd6a | 2019-08-22 19:17:50 +0000 | [diff] [blame] | 189 | // Section matchers |
| 190 | NameMatcher KeepSection; |
| 191 | NameMatcher OnlySection; |
| 192 | NameMatcher ToRemove; |
| 193 | |
| 194 | // Symbol matchers |
| 195 | NameMatcher SymbolsToGlobalize; |
| 196 | NameMatcher SymbolsToKeep; |
| 197 | NameMatcher SymbolsToLocalize; |
| 198 | NameMatcher SymbolsToRemove; |
| 199 | NameMatcher UnneededSymbolsToRemove; |
| 200 | NameMatcher SymbolsToWeaken; |
| 201 | NameMatcher SymbolsToKeepGlobal; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 202 | |
| 203 | // Map options |
| 204 | StringMap<SectionRename> SectionsToRename; |
Fangrui Song | 671fb34 | 2019-10-02 12:41:25 +0000 | [diff] [blame] | 205 | StringMap<uint64_t> SetSectionAlignment; |
Jordan Rupprecht | c892741 | 2019-01-29 15:05:38 +0000 | [diff] [blame] | 206 | StringMap<SectionFlagsUpdate> SetSectionFlags; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 207 | StringMap<StringRef> SymbolsToRename; |
| 208 | |
Eugene Leviant | 53350d0 | 2019-02-26 09:24:22 +0000 | [diff] [blame] | 209 | // ELF entry point address expression. The input parameter is an entry point |
| 210 | // address in the input ELF file. The entry address in the output file is |
| 211 | // calculated with EntryExpr(input_address), when either --set-start or |
| 212 | // --change-start is used. |
| 213 | std::function<uint64_t(uint64_t)> EntryExpr; |
| 214 | |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 215 | // Boolean options |
James Henderson | 66a9d0f | 2019-04-18 09:13:30 +0000 | [diff] [blame] | 216 | bool AllowBrokenLinks = false; |
Jordan Rupprecht | fc780bb | 2018-11-01 17:36:37 +0000 | [diff] [blame] | 217 | bool DeterministicArchives = true; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 218 | bool ExtractDWO = false; |
Peter Collingbourne | 8d58a98 | 2019-06-07 17:57:48 +0000 | [diff] [blame] | 219 | bool ExtractMainPartition = false; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 220 | bool KeepFileSymbols = false; |
| 221 | bool LocalizeHidden = false; |
| 222 | bool OnlyKeepDebug = false; |
| 223 | bool PreserveDates = false; |
| 224 | bool StripAll = false; |
| 225 | bool StripAllGNU = false; |
| 226 | bool StripDWO = false; |
| 227 | bool StripDebug = false; |
| 228 | bool StripNonAlloc = false; |
| 229 | bool StripSections = false; |
Alexander Shaposhnikov | 842a8cc | 2020-05-26 16:49:56 -0700 | [diff] [blame] | 230 | bool StripSwiftSymbols = false; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 231 | bool StripUnneeded = false; |
| 232 | bool Weaken = false; |
| 233 | bool DecompressDebugSections = false; |
Tobias Hieta | 61133e0 | 2020-10-13 00:45:14 -0700 | [diff] [blame] | 234 | // install-name-tool's --delete_all_rpaths |
| 235 | bool RemoveAllRpaths = false; |
| 236 | |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 237 | DebugCompressionType CompressionType = DebugCompressionType::None; |
Seiya Nuta | c83eefc | 2019-09-24 09:38:23 +0000 | [diff] [blame] | 238 | |
| 239 | // parseELFConfig performs ELF-specific command-line parsing. Fills `ELF` on |
| 240 | // success or returns an Error otherwise. |
| 241 | Error parseELFConfig() { |
| 242 | if (!ELF) { |
| 243 | Expected<elf::ELFCopyConfig> ELFConfig = elf::parseConfig(*this); |
| 244 | if (!ELFConfig) |
| 245 | return ELFConfig.takeError(); |
| 246 | ELF = *ELFConfig; |
| 247 | } |
| 248 | return Error::success(); |
| 249 | } |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 250 | }; |
| 251 | |
| 252 | // Configuration for the overall invocation of this tool. When invoked as |
| 253 | // objcopy, will always contain exactly one CopyConfig. When invoked as strip, |
| 254 | // will contain one or more CopyConfigs. |
| 255 | struct DriverConfig { |
| 256 | SmallVector<CopyConfig, 1> CopyConfigs; |
Jordan Rupprecht | 5745c5f | 2019-02-04 18:38:00 +0000 | [diff] [blame] | 257 | BumpPtrAllocator Alloc; |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 258 | }; |
| 259 | |
| 260 | // ParseObjcopyOptions returns the config and sets the input arguments. If a |
| 261 | // help flag is set then ParseObjcopyOptions will print the help messege and |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 262 | // exit. ErrorCallback is used to handle recoverable errors. An Error returned |
| 263 | // by the callback aborts the parsing and is then returned by this function. |
| 264 | Expected<DriverConfig> |
| 265 | parseObjcopyOptions(ArrayRef<const char *> ArgsArr, |
| 266 | llvm::function_ref<Error(Error)> ErrorCallback); |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 267 | |
Alexander Shaposhnikov | c54959c | 2019-11-19 23:30:52 -0800 | [diff] [blame] | 268 | // ParseInstallNameToolOptions returns the config and sets the input arguments. |
| 269 | // If a help flag is set then ParseInstallNameToolOptions will print the help |
| 270 | // messege and exit. |
| 271 | Expected<DriverConfig> |
| 272 | parseInstallNameToolOptions(ArrayRef<const char *> ArgsArr); |
| 273 | |
Alexander Shaposhnikov | 5495b69 | 2020-09-18 18:11:22 -0700 | [diff] [blame] | 274 | // ParseBitcodeStripOptions returns the config and sets the input arguments. |
| 275 | // If a help flag is set then ParseBitcodeStripOptions will print the help |
| 276 | // messege and exit. |
| 277 | Expected<DriverConfig> parseBitcodeStripOptions(ArrayRef<const char *> ArgsArr); |
| 278 | |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 279 | // ParseStripOptions returns the config and sets the input arguments. If a |
| 280 | // help flag is set then ParseStripOptions will print the help messege and |
Alex Brachet | 7747700 | 2019-06-18 00:39:10 +0000 | [diff] [blame] | 281 | // exit. ErrorCallback is used to handle recoverable errors. An Error returned |
| 282 | // by the callback aborts the parsing and is then returned by this function. |
| 283 | Expected<DriverConfig> |
| 284 | parseStripOptions(ArrayRef<const char *> ArgsArr, |
Jordan Rupprecht | edeebad | 2019-10-17 20:51:00 +0000 | [diff] [blame] | 285 | llvm::function_ref<Error(Error)> ErrorCallback); |
Alexander Shaposhnikov | 8d0b74c | 2018-10-11 22:33:50 +0000 | [diff] [blame] | 286 | } // namespace objcopy |
| 287 | } // namespace llvm |
| 288 | |
| 289 | #endif |