[llvm] [llvm-objcopy][ELF] Disable huge section offset (PR #97036)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 00:59:46 PDT 2024


================
@@ -1054,6 +1054,11 @@ objcopy::parseObjcopyOptions(ArrayRef<const char *> RawArgsArr,
   Config.ExtractMainPartition =
       InputArgs.hasArg(OBJCOPY_extract_main_partition);
   ELFConfig.LocalizeHidden = InputArgs.hasArg(OBJCOPY_localize_hidden);
+
+  if (auto *Arg = InputArgs.getLastArg(OBJCOPY_set_max_section_offset)) {
+    ELFConfig.MaxSectionOffset = std::stoull(Arg->getValue());
+  }
----------------
jh7370 wrote:

Braces aren't needed.

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


More information about the llvm-commits mailing list