[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)
Ulrich Weigand via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 7 12:06:36 PDT 2025
================
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() {
return static_cast<GOFFObjectWriter &>(getAssembler().getWriter());
}
+void MCGOFFStreamer::initSections(bool /*NoExecStack*/,
+ const MCSubtargetInfo &STI) {
+ MCContext &Ctx = getContext();
+ // Emit the text section.
+ switchSection(Ctx.getObjectFileInfo()->getTextSection());
+}
+
+namespace {
+// Make sure that all section are registered in the correct order.
+void registerSectionHierarchy(MCAssembler &Asm, MCSectionGOFF *Section) {
+ if (Section->isRegistered())
+ return;
+ if (Section->getParent())
+ registerSectionHierarchy(Asm, Section->getParent());
+ registerSectionHierarchy(Asm, Section);
----------------
uweigand wrote:
Huh? How is this not just an endless recursion?
https://github.com/llvm/llvm-project/pull/133799
More information about the llvm-branch-commits
mailing list