[llvm] [llvm-objcopy] Add --change-section-address (PR #98664)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 02:40:11 PDT 2024


================
@@ -874,6 +933,16 @@ objcopy::parseObjcopyOptions(ArrayRef<const char *> RawArgsArr,
     Config.ChangeSectionLMAValAll = *LMAValue;
   }
 
+  for (auto *Arg : InputArgs.filtered(OBJCOPY_change_section_address)) {
+    Expected<SectionPatternAddressUpdate> AddressUpdate =
+        parseChangeSectionAddr(Arg->getValue(), Arg->getSpelling(),
+                               SectionMatchStyle, ErrorCallback);
+    if (!AddressUpdate)
+      return AddressUpdate.takeError();
+    else
----------------
jh7370 wrote:

https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return

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


More information about the llvm-commits mailing list