[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)
Kai Nacke via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 7 12:17:08 PDT 2025
================
@@ -239,6 +298,63 @@ class GOFFWriter {
GOFFWriter::GOFFWriter(raw_pwrite_stream &OS, MCAssembler &Asm)
: OS(OS), Asm(Asm) {}
+void GOFFWriter::defineSectionSymbols(const MCSectionGOFF &Section) {
+ if (Section.isSD()) {
+ GOFFSymbol SD(Section.getName(), Section.getId(),
+ Section.getSDAttributes());
+ writeSymbol(SD);
+ }
+
+ if (Section.isED()) {
+ GOFFSymbol ED(Section.getName(), Section.getId(),
+ Section.getParent()->getId(), Section.getEDAttributes());
+ if (Section.requiresLength())
----------------
redstar wrote:
> so it's size should be zero naturally?
Yes, that's true, and it makes the code easier.
https://github.com/llvm/llvm-project/pull/133799
More information about the llvm-branch-commits
mailing list