[PATCH] D120861: [XCOFF][1/3] support fileHeader and sectionHeaders in 64-bit XCOFF.

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 06:08:49 PDT 2022


DiggerLin added inline comments.


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:1039
   // Calculate the RawPointer value for each section.
-  uint64_t RawPointer = XCOFF::FileHeaderSize32 + auxiliaryHeaderSize() +
-                        SectionCount * XCOFF::SectionHeaderSize32;
+  uint64_t RawPointer = is64Bit() ? (XCOFF::FileHeaderSize64 +
+                                     SectionCount * XCOFF::SectionHeaderSize64)
----------------
Esme wrote:
> DiggerLin wrote:
> >  why there is no "+auxiliaryHeaderSize()  " 
> As I understand, we don't need to support auxiliary header in ObjectWriter?
I think we need the support  support auxiliary header later when we want to support  visibility in symbol. 

the function auxiliaryHeaderSize() only be used here.  I think you can keep "+auxiliaryHeaderSize()" here.   otherwise the definition of the function will be deleted too. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120861/new/

https://reviews.llvm.org/D120861



More information about the llvm-commits mailing list