diff options
author | Alexander Shaposhnikov <alexshap@fb.com> | 2019-11-18 15:44:58 -0800 |
---|---|---|
committer | Alexander Shaposhnikov <alexshap@fb.com> | 2019-11-19 15:16:32 -0800 |
commit | 88f00aef684ff84a6494e1f17d5466c5678f703d (patch) | |
tree | fcea95badfc8a2f1ca19fb4f5b4f90b2c328f482 /llvm/tools/llvm-objcopy/CopyConfig.h | |
parent | 28a91473e33eb3585a87514e4cf2523a9a587d82 (diff) | |
download | llvm-88f00aef684ff84a6494e1f17d5466c5678f703d.zip llvm-88f00aef684ff84a6494e1f17d5466c5678f703d.tar.gz llvm-88f00aef684ff84a6494e1f17d5466c5678f703d.tar.bz2 |
Introduce llvm-install-name-tool
This diff adds a new "driver" for llvm-objcopy
which is supposed to emulate the behavior of install-name-tool.
This is a recommit of b5913e6d2 with ubsan issues fixed.
Differential revision: https://reviews.llvm.org/D69146
Test plan: make check-all
Diffstat (limited to 'llvm/tools/llvm-objcopy/CopyConfig.h')
-rw-r--r-- | llvm/tools/llvm-objcopy/CopyConfig.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/tools/llvm-objcopy/CopyConfig.h b/llvm/tools/llvm-objcopy/CopyConfig.h index 55a55d3..c262934 100644 --- a/llvm/tools/llvm-objcopy/CopyConfig.h +++ b/llvm/tools/llvm-objcopy/CopyConfig.h @@ -150,9 +150,9 @@ struct CopyConfig { // Main input/output options StringRef InputFilename; - FileFormat InputFormat; + FileFormat InputFormat = FileFormat::Unspecified; StringRef OutputFilename; - FileFormat OutputFormat; + FileFormat OutputFormat = FileFormat::Unspecified; // Only applicable when --output-format!=binary (e.g. elf64-x86-64). Optional<MachineInfo> OutputArch; @@ -175,6 +175,7 @@ struct CopyConfig { std::vector<StringRef> AddSection; std::vector<StringRef> DumpSection; std::vector<StringRef> SymbolsToAdd; + std::vector<StringRef> RPathToAdd; // Section matchers NameMatcher KeepSection; @@ -251,6 +252,12 @@ Expected<DriverConfig> parseObjcopyOptions(ArrayRef<const char *> ArgsArr, llvm::function_ref<Error(Error)> ErrorCallback); +// ParseInstallNameToolOptions returns the config and sets the input arguments. +// If a help flag is set then ParseInstallNameToolOptions will print the help +// messege and exit. +Expected<DriverConfig> +parseInstallNameToolOptions(ArrayRef<const char *> ArgsArr); + // ParseStripOptions returns the config and sets the input arguments. If a // help flag is set then ParseStripOptions will print the help messege and // exit. ErrorCallback is used to handle recoverable errors. An Error returned @@ -258,7 +265,6 @@ parseObjcopyOptions(ArrayRef<const char *> ArgsArr, Expected<DriverConfig> parseStripOptions(ArrayRef<const char *> ArgsArr, llvm::function_ref<Error(Error)> ErrorCallback); - } // namespace objcopy } // namespace llvm |