LLVM 22.0.0git
ELFObjcopy.h
Go to the documentation of this file.
1//===- ELFObjcopy.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
9#ifndef LLVM_OBJCOPY_ELF_ELFOBJCOPY_H
10#define LLVM_OBJCOPY_ELF_ELFOBJCOPY_H
11
13
14namespace llvm {
15class Error;
16class MemoryBuffer;
17class raw_ostream;
18
19namespace object {
21} // end namespace object
22
23namespace objcopy {
24struct CommonConfig;
25struct ELFConfig;
26
27namespace elf {
28/// Apply the transformations described by \p Config and \p ELFConfig to
29/// \p In, which must represent an IHex file, and writes the result
30/// into \p Out.
31/// \returns any Error encountered whilst performing the operation.
33 const ELFConfig &ELFConfig,
34 MemoryBuffer &In, raw_ostream &Out);
35
36/// Apply the transformations described by \p Config and \p ELFConfig to
37/// \p In, which is treated as a raw binary input, and writes the result
38/// into \p Out.
39/// \returns any Error encountered whilst performing the operation.
41 const ELFConfig &ELFConfig,
42 MemoryBuffer &In, raw_ostream &Out);
43
44/// Apply the transformations described by \p Config and \p ELFConfig to
45/// \p In and writes the result into \p Out.
46/// \returns any Error encountered whilst performing the operation.
48 const ELFConfig &ELFConfig,
50 raw_ostream &Out);
51
52} // end namespace elf
53} // end namespace objcopy
54} // end namespace llvm
55
56#endif // LLVM_OBJCOPY_ELF_ELFOBJCOPY_H
#define LLVM_ABI
Definition Compiler.h:213
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
This interface provides simple read-only access to a block of memory, and provides simple methods for...
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
LLVM_ABI Error executeObjcopyOnIHex(const CommonConfig &Config, const ELFConfig &ELFConfig, MemoryBuffer &In, raw_ostream &Out)
Apply the transformations described by Config and ELFConfig to In, which must represent an IHex file,...
LLVM_ABI Error executeObjcopyOnBinary(const CommonConfig &Config, const ELFConfig &ELFConfig, object::ELFObjectFileBase &In, raw_ostream &Out)
Apply the transformations described by Config and ELFConfig to In and writes the result into Out.
LLVM_ABI Error executeObjcopyOnRawBinary(const CommonConfig &Config, const ELFConfig &ELFConfig, MemoryBuffer &In, raw_ostream &Out)
Apply the transformations described by Config and ELFConfig to In, which is treated as a raw binary i...
This is an optimization pass for GlobalISel generic memory operations.