[llvm] [llvm-objcopy] Add change-section-lma *+/-offset (PR #95431)

Eleanor Bonnici via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 08:51:43 PDT 2024


================
@@ -552,6 +552,33 @@ static Error loadNewSectionData(StringRef ArgValue, StringRef OptionName,
   return Error::success();
 }
 
+static Expected<int64_t> parseAdjustSectionLMA(StringRef ArgValue,
+                                               StringRef OptionName) {
+  StringRef StringValue;
+  if (ArgValue.starts_with("*+")) {
+    StringValue = ArgValue.slice(2, StringRef::npos);
+  } else if (ArgValue.starts_with("*-")) {
+    StringValue = ArgValue.slice(1, StringRef::npos);
+  } else {
+    return createStringError(errc::invalid_argument,
+                             "bad format for " + OptionName +
+                                 ": it is required that all sections "
----------------
eleanor-arm wrote:

Fixed

https://github.com/llvm/llvm-project/pull/95431


More information about the llvm-commits mailing list