[PATCH] D152945: [SystemZ][z/OS] Implement executePostLayoutBinding for GOFFWriter

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 07:33:07 PDT 2023


DiggerLin added inline comments.


================
Comment at: llvm/lib/MC/GOFFObjectWriter.cpp:885
+
+  for (auto &Fragment : *MC) {
+    LLVM_DEBUG(dbgs() << "Frag Kind: "
----------------
I am not familiar with GOFF, I am curious that why  we can not use the API defined at https://llvm.org/doxygen/MCAssembler_8cpp_source.html#l00730  to write the section date as XCOFF and ELF?

if we can not use the API 

```
void writeSectionData(raw_ostream &OS, const MCSection *Section, const MCAsmLayout &Layout) const;
```

,it will be useful to  add some comment to explain why? 

and the code 


```
 static void writeFragment(raw_ostream &OS, const MCAssembler &Asm,
                          const MCAsmLayout &Layout, const MCFragment &F)
```

https://llvm.org/doxygen/MCAssembler_8cpp_source.html#l00512 deal with all different Fragment Kind.  




================
Comment at: llvm/lib/MC/GOFFObjectWriter.cpp:1054
+  for (const auto &Sec : Sections)
+    writeText(*Sec, Asm, Layout);
   writeEnd();
----------------
 the GOFF has text section and data section ? if has , change the name to write writeSection ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152945



More information about the llvm-commits mailing list