[llvm] [SystemZ][z/OS] Implement executePostLayoutBinding for GOFFObjectWriter (PR #67868)

Kevin P. Neal via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 11:54:14 PDT 2023


================
@@ -258,6 +699,268 @@ void GOFFObjectWriter::writeHeader() {
   OS.write_zeros(6);       // Reserved
 }
 
+void GOFFObjectWriter::writeSymbol(const GOFFSymbol &Symbol,
+                                   const MCAsmLayout &Layout) {
+  uint32_t Offset = 0;
+  uint32_t Length = 0;
+  GOFF::ESDNameSpaceId NameSpaceId = GOFF::ESD_NS_ProgramManagementBinder;
+  Flags SymbolFlags;
+  uint8_t FillByteValue = 0;
+
+  Flags BehavAttrs[10] = {};
+  auto setAmode = [&BehavAttrs](GOFF::ESDAmode Amode) {
----------------
kpneal wrote:

Doing it this way means the code matches the documentation. For example, BehavAttrs[3] would match the documented behavioral attributes at offset "3.x".

https://github.com/llvm/llvm-project/pull/67868


More information about the llvm-commits mailing list