[PATCH] D137819: [XCOFF] support the overflow section (only relocation overflow is handled).
    Digger Lin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Dec 14 12:12:48 PST 2022
    
    
  
DiggerLin added inline comments.
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:1080
+  Sec->FileOffsetToRelocations = RawPointer;
+  uint64_t RelocationSizeInSec = 0;
+  if (!is64Bit() &&
----------------
we do not need introduce a new variable RelocationSizeInSec 
We can update 
```
RawPointer += OverflowSec.Address * XCOFF::RelocationSerializationSize32;
```
and 
```
RawPointer += Sec->RelocationCount *
                          (is64Bit() ? XCOFF::RelocationSerializationSize64: XCOFF::RelocationSerializationSize32);
```
directly.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137819/new/
https://reviews.llvm.org/D137819
    
    
More information about the llvm-commits
mailing list