LLVM 20.0.0git
|
Classes | |
struct | Object |
class | Reader |
struct | Section |
class | Writer |
Typedefs | |
using | SectionPred = std::function< bool(const Section &Sec)> |
Functions | |
Error | executeObjcopyOnBinary (const CommonConfig &Config, const WasmConfig &, object::WasmObjectFile &In, raw_ostream &Out) |
Apply the transformations described by Config and WasmConfig to In and writes the result into Out . | |
static bool | isDebugSection (const Section &Sec) |
static bool | isLinkerSection (const Section &Sec) |
static bool | isNameSection (const Section &Sec) |
static bool | isCommentSection (const Section &Sec) |
static Error | dumpSectionToFile (StringRef SecName, StringRef Filename, Object &Obj) |
static void | removeSections (const CommonConfig &Config, Object &Obj) |
static Error | handleArgs (const CommonConfig &Config, Object &Obj) |
using llvm::objcopy::wasm::SectionPred = typedef std::function<bool(const Section &Sec)> |
Definition at line 22 of file WasmObjcopy.cpp.
|
static |
Definition at line 40 of file WasmObjcopy.cpp.
References llvm::ArrayRef< T >::begin(), llvm::objcopy::wasm::Section::Contents, llvm::FileOutputBuffer::create(), llvm::createStringError(), E, llvm::ArrayRef< T >::end(), llvm::invalid_argument, llvm::objcopy::wasm::Section::Name, llvm::objcopy::wasm::Object::Sections, llvm::ArrayRef< T >::size(), llvm::StringRef::str(), llvm::Error::success(), and llvm::Expected< T >::takeError().
Referenced by handleArgs().
Error llvm::objcopy::wasm::executeObjcopyOnBinary | ( | const CommonConfig & | Config, |
const WasmConfig & | , | ||
object::WasmObjectFile & | In, | ||
raw_ostream & | Out | ||
) |
Apply the transformations described by Config
and WasmConfig
to In
and writes the result into Out
.
Definition at line 144 of file WasmObjcopy.cpp.
References assert(), Config, llvm::objcopy::wasm::Reader::create(), llvm::createFileError(), E, llvm::Expected< T >::get(), handleArgs(), llvm::Error::success(), llvm::Expected< T >::takeError(), and llvm::objcopy::wasm::Writer::write().
Referenced by llvm::objcopy::executeObjcopyOnBinary().
|
static |
Definition at line 112 of file WasmObjcopy.cpp.
References llvm::objcopy::wasm::Object::addSectionWithOwnedContents(), Config, llvm::objcopy::wasm::Section::Contents, llvm::createFileError(), dumpSectionToFile(), E, llvm::MemoryBuffer::getMemBufferCopy(), llvm::objcopy::wasm::Section::Name, removeSections(), llvm::objcopy::NewSectionInfo::SectionData, llvm::objcopy::NewSectionInfo::SectionName, llvm::objcopy::wasm::Section::SectionType, llvm::Error::success(), and llvm::wasm::WASM_SEC_CUSTOM.
Referenced by executeObjcopyOnBinary().
Definition at line 36 of file WasmObjcopy.cpp.
References llvm::objcopy::wasm::Section::Name.
Referenced by removeSections().
Definition at line 24 of file WasmObjcopy.cpp.
References llvm::objcopy::wasm::Section::Name, and llvm::StringRef::starts_with().
Referenced by removeSections().
Definition at line 28 of file WasmObjcopy.cpp.
References llvm::objcopy::wasm::Section::Name, and llvm::StringRef::starts_with().
Referenced by removeSections().
Definition at line 32 of file WasmObjcopy.cpp.
References llvm::objcopy::wasm::Section::Name.
Referenced by removeSections().
|
static |
Definition at line 60 of file WasmObjcopy.cpp.
References Config, isCommentSection(), isDebugSection(), isLinkerSection(), isNameSection(), and llvm::objcopy::wasm::Object::removeSections().
Referenced by handleArgs().