[llvm] [GOFF] Add writing of section symbols (PR #133799)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 23 00:56:51 PDT 2025
================
@@ -26,6 +26,21 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() {
return static_cast<GOFFObjectWriter &>(getAssembler().getWriter());
}
+// Make sure that all section are registered in the correct order.
+static void registerSectionHierarchy(MCAssembler &Asm, MCSectionGOFF *Section) {
+ if (Section->isRegistered())
+ return;
+ if (Section->getParent())
+ registerSectionHierarchy(Asm, Section->getParent());
+ Asm.registerSection(*Section);
----------------
MaskRay wrote:
This calls registerSection outside MCObjectStreamer::changeSection, which should be avoided.
Sent https://github.com/llvm/llvm-project/pull/150183 to fix it.
This is required for a MCContext fragment refactoring
https://github.com/MaskRay/llvm-project/pull/4
https://github.com/llvm/llvm-project/pull/133799
More information about the llvm-commits
mailing list