================
@@ -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())
+ ED.SectionLength = Asm.getSectionAddressSize(Section);
+ writeSymbol(ED);
+ }
+
+ if (Section.isPR()) {
+ GOFFSymbol PR(Section.getName(), Section.getId(),
+ Section.getParent()->getId(), Section.getPRAttributes());
+ PR.SectionLength = Asm.getSectionAddressSize(Section);
+ if (Section.requiresNonZeroLength()) {
----------------
uweigand wrote:
This is also unclear to me. What are the actual rules? Is is that PR
sections of size zero are generally not allowed? Then why do we need an extra
flag here?
https://github.com/llvm/llvm-project/pull/133799
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits