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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
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/
@@ -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
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
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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
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
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
@@ -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
@@ -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
@@ -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) {
--
@@ -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) {
--
@@ -599,8 +600,18 @@ class MCContext {
unsigned Flags,
unsigned EntrySize);
- MCSectionGOFF *getGOFFSection(StringRef Section, SectionKind Kind,
-
@@ -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
@@ -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
@@ -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
@@ -599,8 +600,18 @@ class MCContext {
unsigned Flags,
unsigned EntrySize);
- MCSectionGOFF *getGOFFSection(StringRef Section, SectionKind Kind,
-
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -2759,6 +2762,29 @@ MCSection
*TargetLoweringObjectFileXCOFF::getSectionForLSDA(
//===--===//
TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default;
+void TargetLoweringObjectFileGOFF::ge
@@ -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
@@ -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
@@ -2759,6 +2762,29 @@ MCSection
*TargetLoweringObjectFileXCOFF::getSectionForLSDA(
//===--===//
TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default;
+void TargetLoweringObjectFileGOFF::ge
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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -599,8 +615,23 @@ class MCContext {
unsigned Flags,
unsigned EntrySize);
- MCSectionGOFF *getGOFFSection(StringRef Section, SectionKind Kind,
-
@@ -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
@@ -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;
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -2759,6 +2762,29 @@ MCSection
*TargetLoweringObjectFileXCOFF::getSectionForLSDA(
//===--===//
TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default;
+void TargetLoweringObjectFileGOFF::ge
@@ -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
@@ -2759,6 +2762,29 @@ MCSection
*TargetLoweringObjectFileXCOFF::getSectionForLSDA(
//===--===//
TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default;
+void TargetLoweringObjectFileGOFF::ge
@@ -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
@@ -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;
@@ -2759,6 +2760,12 @@ MCSection
*TargetLoweringObjectFileXCOFF::getSectionForLSDA(
//===--===//
TargetLoweringObjectFileGOFF::TargetLoweringObjectFileGOFF() = default;
+void TargetLoweringObjectFileGOFF::ge
@@ -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
@@ -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
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() {
return static_cast(getAssembler().getWriter());
}
+void MCGOFFStreamer::initSections(bool /*NoExecStack*/,
+ const MCSubtargetInfo &STI) {
+ MCContext &Ctx = getContext();
+
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
@@ -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;
@@ -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
@@ -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
@@ -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;
@@ -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;
@@ -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
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
@@ -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
@@ -671,24 +672,48 @@ MCContext::getELFUniqueIDForEntsize(StringRef
SectionName, unsigned Flags,
: std::nullopt;
}
-MCSectionGOFF *MCContext::getGOFFSection(StringRef Section, SectionKind Kind,
- MC
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() {
return static_cast(getAssembler().getWriter());
}
+void MCGOFFStreamer::initSections(bool /*NoExecStack*/,
+ const MCSubtargetInfo &STI) {
+ MCContext &Ctx = getContext();
+
@@ -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
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() {
return static_cast(getAssembler().getWriter());
}
+void MCGOFFStreamer::initSections(bool /*NoExecStack*/,
+ const MCSubtargetInfo &STI) {
+ MCContext &Ctx = getContext();
+
@@ -26,6 +27,29 @@ GOFFObjectWriter &MCGOFFStreamer::getWriter() {
return static_cast(getAssembler().getWriter());
}
+void MCGOFFStreamer::initSections(bool /*NoExecStack*/,
+ const MCSubtargetInfo &STI) {
+ MCContext &Ctx = getContext();
+
@@ -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 - 100 of 148 matches
Mail list logo