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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 03:04:11 PDT 2024


================
@@ -2744,6 +2744,13 @@ Error BinaryWriter::finalize() {
     if (Sec.Type != SHT_NOBITS && Sec.Size > 0) {
       Sec.Offset = Sec.Addr - MinAddr;
       TotalSize = std::max(TotalSize, Sec.Offset + Sec.Size);
+
+      if (MaxHugeSectionOffset) {
+        if (Sec.Offset > *MaxHugeSectionOffset)
----------------
arsenm wrote:

Can fold these ifs together 

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


More information about the llvm-commits mailing list