[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-26 Thread Ulrich Weigand via llvm-branch-commits
https://github.com/uweigand approved this pull request. This version looks good to me now, thanks! https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-25 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-25 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-25 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-25 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-24 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-24 Thread Ulrich Weigand via llvm-branch-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-24 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-24 Thread Ulrich Weigand via llvm-branch-commits
https://github.com/uweigand commented: Looks generally good to me now, still a few comments inline. https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-06-16 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-05-06 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: > @MaskRay Sorry, your comment is basically empty. I guess a GitHub problem? Sorry... Could be my accidentally pushing a comment to a wrong PR.. https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-05-06 Thread Kai Nacke via llvm-branch-commits
redstar wrote: @MaskRay Sorry, your comment is basically empty. I guess a GitHub problem? https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-05-02 Thread Fangrui Song via llvm-branch-commits
MaskRay wrote: 3 δΉ‹ https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -223,13 +197,95 @@ void GOFFOstream::finalizeRecord() { } namespace { +// A GOFFSymbol holds all the data required for writing an ESD record. +class GOFFSymbol { +public: + std::string Name; + uint32_t EsdId; + uint32_t ParentEsdId; + uint64_t Offset = 0; // Offset of t

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-29 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-25 Thread Ulrich Weigand via llvm-branch-commits
@@ -223,13 +197,95 @@ void GOFFOstream::finalizeRecord() { } namespace { +// A GOFFSymbol holds all the data required for writing an ESD record. +class GOFFSymbol { +public: + std::string Name; + uint32_t EsdId; + uint32_t ParentEsdId; + uint64_t Offset = 0; // Offset of t

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-25 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-25 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,106 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-25 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-25 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-25 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-23 Thread Kai Nacke via llvm-branch-commits
redstar wrote: @uweigand I made all the suggested changes. https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-21 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-17 Thread Fangrui Song via llvm-branch-commits
https://github.com/MaskRay commented: LGTM. As I'm not familiar with z/OS, my review focused on its compatibility with the current MC infrastructure. (My internet access will be limited between April 20th and May 4th, which may cause delays in my response time.) Thanks for reimplementing the g

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar edited https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,112 @@ +; RUN: llc <%s --mtriple s390x-ibm-zos --filetype=obj -o - | \ redstar wrote: Moved the tests. https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commit

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,141 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -26,6 +27,23 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +namespace { +// Make sure that all section are registered in the correct order. +void registerSectionHierarchy(MCAssembler &Asm, MCSectionGOFF *Section) { --

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -26,6 +27,23 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +namespace { +// Make sure that all section are registered in the correct order. +void registerSectionHierarchy(MCAssembler &Asm, MCSectionGOFF *Section) { --

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -599,8 +600,18 @@ class MCContext { unsigned Flags, unsigned EntrySize); - MCSectionGOFF *getGOFFSection(StringRef Section, SectionKind Kind, -

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Fangrui Song via llvm-branch-commits
@@ -0,0 +1,112 @@ +; RUN: llc <%s --mtriple s390x-ibm-zos --filetype=obj -o - | \ MaskRay wrote: `llc < %s` does not need `-o -`. .ll tests in llvm/test/MC is probably not a good convention we'd recommend. Move to llvm/test/CodeGen/SystemZ, perhaps under a dire

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Fangrui Song via llvm-branch-commits
@@ -599,8 +600,18 @@ class MCContext { unsigned Flags, unsigned EntrySize); - MCSectionGOFF *getGOFFSection(StringRef Section, SectionKind Kind, -

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
https://github.com/redstar edited https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-15 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -2759,6 +2762,29 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForLSDA( //===--===// TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default; +void TargetLoweringObjectFileGOFF::ge

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread via llvm-branch-commits
@@ -2759,6 +2762,29 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForLSDA( //===--===// TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default; +void TargetLoweringObjectFileGOFF::ge

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread via llvm-branch-commits
https://github.com/AidoP edited https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread via llvm-branch-commits
https://github.com/AidoP edited https://github.com/llvm/llvm-project/pull/133799 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-14 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-11 Thread Kai Nacke via llvm-branch-commits
@@ -223,13 +197,95 @@ void GOFFOstream::finalizeRecord() { } namespace { +// A GOFFSymbol holds all the data required for writing an ESD record. +class GOFFSymbol { +public: + std::string Name; + uint32_t EsdId; + uint32_t ParentEsdId; + uint64_t Offset = 0; // Offset of t

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-11 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-11 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -599,8 +615,23 @@ class MCContext { unsigned Flags, unsigned EntrySize); - MCSectionGOFF *getGOFFSection(StringRef Section, SectionKind Kind, -

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Kai Nacke via llvm-branch-commits
@@ -16,34 +16,95 @@ #define LLVM_MC_MCSECTIONGOFF_H #include "llvm/BinaryFormat/GOFF.h" +#include "llvm/MC/MCGOFFAttributes.h" #include "llvm/MC/MCSection.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCExpr;

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -230,10 +230,11 @@ class MCObjectFileInfo { MCSection *GLJMPSection = nullptr; // GOFF specific sections. - MCSection *PPA1Section = nullptr; - MCSection *PPA2Section = nullptr; - MCSection *PPA2ListSection = nullptr; - MCSection *ADASection = nullptr; + MCSection

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Kai Nacke via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,113 @@ +//===- MCGOFFAttributes.h - Attributes of GOFF symbols ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -0,0 +1,145 @@ +//===- MCSectionGOFF.cpp - GOFF Code Section Representation ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Kai Nacke via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Ulrich Weigand via llvm-branch-commits
@@ -16,6 +16,9 @@ namespace llvm { class GOFFObjectWriter; class MCGOFFStreamer : public MCObjectStreamer { + std::string RootSDName; + std::string ADAPRName; uweigand wrote: These are no longer used, I think. https://github.com/llvm/llvm-project/pull/1337

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-10 Thread Kai Nacke via llvm-branch-commits
@@ -2759,6 +2762,29 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForLSDA( //===--===// TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default; +void TargetLoweringObjectFileGOFF::ge

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-09 Thread Ulrich Weigand via llvm-branch-commits
@@ -230,10 +230,11 @@ class MCObjectFileInfo { MCSection *GLJMPSection = nullptr; // GOFF specific sections. - MCSection *PPA1Section = nullptr; - MCSection *PPA2Section = nullptr; - MCSection *PPA2ListSection = nullptr; - MCSection *ADASection = nullptr; + MCSection

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-09 Thread via llvm-branch-commits
@@ -2759,6 +2762,29 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForLSDA( //===--===// TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default; +void TargetLoweringObjectFileGOFF::ge

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-09 Thread Kai Nacke via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Ulrich Weigand via llvm-branch-commits
@@ -16,34 +16,94 @@ #define LLVM_MC_MCSECTIONGOFF_H #include "llvm/BinaryFormat/GOFF.h" +#include "llvm/MC/MCGOFFAttributes.h" #include "llvm/MC/MCSection.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCExpr;

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -2759,6 +2760,12 @@ MCSection *TargetLoweringObjectFileXCOFF::getSectionForLSDA( //===--===// TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default; +void TargetLoweringObjectFileGOFF::ge

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -230,10 +230,11 @@ class MCObjectFileInfo { MCSection *GLJMPSection = nullptr; // GOFF specific sections. - MCSection *PPA1Section = nullptr; - MCSection *PPA2Section = nullptr; - MCSection *PPA2ListSection = nullptr; - MCSection *ADASection = nullptr; + MCSection

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +void MCGOFFStreamer::initSections(bool /*NoExecStack*/, + const MCSubtargetInfo &STI) { + MCContext &Ctx = getContext(); +

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
redstar wrote: > > I use the ordinal number +1 of the section as the section number, but still > > need a counter for the symbols. > > Can't we just set the ordinal to the correct value to begin with? ELF sets > the ordinals while writing out the sections; I think we might as well do the > sa

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -16,34 +16,95 @@ #define LLVM_MC_MCSECTIONGOFF_H #include "llvm/BinaryFormat/GOFF.h" +#include "llvm/MC/MCGOFFAttributes.h" #include "llvm/MC/MCSection.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCExpr;

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-08 Thread Kai Nacke via llvm-branch-commits
@@ -230,10 +230,11 @@ class MCObjectFileInfo { MCSection *GLJMPSection = nullptr; // GOFF specific sections. - MCSection *PPA1Section = nullptr; - MCSection *PPA2Section = nullptr; - MCSection *PPA2ListSection = nullptr; - MCSection *ADASection = nullptr; + MCSection

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Ulrich Weigand via llvm-branch-commits
@@ -16,34 +16,95 @@ #define LLVM_MC_MCSECTIONGOFF_H #include "llvm/BinaryFormat/GOFF.h" +#include "llvm/MC/MCGOFFAttributes.h" #include "llvm/MC/MCSection.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCExpr;

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -16,34 +16,94 @@ #define LLVM_MC_MCSECTIONGOFF_H #include "llvm/BinaryFormat/GOFF.h" +#include "llvm/MC/MCGOFFAttributes.h" #include "llvm/MC/MCSection.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" namespace llvm { class MCExpr;

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Ulrich Weigand via llvm-branch-commits
uweigand wrote: > I use the ordinal number +1 of the section as the section number, but still > need a counter for the symbols. Can't we just set the ordinal to the correct value to begin with? ELF sets the ordinals while writing out the sections; I think we might as well do the same. (The

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Ulrich Weigand via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Ulrich Weigand via llvm-branch-commits
@@ -671,24 +672,48 @@ MCContext::getELFUniqueIDForEntsize(StringRef SectionName, unsigned Flags, : std::nullopt; } -MCSectionGOFF *MCContext::getGOFFSection(StringRef Section, SectionKind Kind, - MC

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +void MCGOFFStreamer::initSections(bool /*NoExecStack*/, + const MCSubtargetInfo &STI) { + MCContext &Ctx = getContext(); +

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Kai Nacke via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Ulrich Weigand via llvm-branch-commits
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +void MCGOFFStreamer::initSections(bool /*NoExecStack*/, + const MCSubtargetInfo &STI) { + MCContext &Ctx = getContext(); +

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Ulrich Weigand via llvm-branch-commits
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() { return static_cast(getAssembler().getWriter()); } +void MCGOFFStreamer::initSections(bool /*NoExecStack*/, + const MCSubtargetInfo &STI) { + MCContext &Ctx = getContext(); +

[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

2025-04-07 Thread Ulrich Weigand via llvm-branch-commits
@@ -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

  1   2   >