[llvm] Add functionality to llvm-objcopy to remove prefixes (PR #79415)
Yi Kong via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 28 22:26:18 PST 2024
================
@@ -731,7 +731,15 @@ objcopy::parseObjcopyOptions(ArrayRef<const char *> RawArgsArr,
llvm::crc32(arrayRefFromStringRef(Debug->getBuffer()));
}
Config.SplitDWO = InputArgs.getLastArgValue(OBJCOPY_split_dwo);
+
Config.SymbolsPrefix = InputArgs.getLastArgValue(OBJCOPY_prefix_symbols);
+ Config.SymbolsPrefixRemove =
+ InputArgs.getLastArgValue(OBJCOPY_prefix_symbols_remove);
+ if (!Config.SymbolsPrefix.empty() && !Config.SymbolsPrefixRemove.empty())
+ return createStringError(
+ errc::invalid_argument,
+ "--prefix-symbols and --prefix-symbols-remove are mutualy exclusive");
----------------
kongy wrote:
Done. Added test to enforce the ordering.
https://github.com/llvm/llvm-project/pull/79415
More information about the llvm-commits
mailing list