[llvm] [obj2yaml] Add Obj2Yaml ability to dump GOFF ESD records (PR #216151)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 00:54:09 PDT 2026


================
@@ -0,0 +1,58 @@
+; REQUIRES: systemz-registered-target
+; RUN: llc -mtriple=s390x-ibm-zos -filetype=obj %s -o %t
+; RUN: obj2yaml %t | FileCheck %s
+
+; This test creates symbols with very long names (>8 bytes) to force ESD continuation records
+; and large text data (>56 bytes) to force TXT continuation records.
+
+; CHECK:      --- !GOFF
+; CHECK-NEXT: FileHeader:      {}
+; CHECK-NEXT: ESDRecords:
+
+; Check that long symbol names are preserved correctly
+; CHECK:        Name:            global_variable_with_an_extremely_long_name_to_test_esd_continuations
+; CHECK:        Name:            very_long_function_name_that_exceeds_eight_bytes_and_requires_continuation_records
+; CHECK:        Name:            another_extremely_long_function_name_for_testing_continuation_handling
+
+; Very long function name that will require continuation records
+; Symbol names longer than 8 bytes need continuations in ESD records
+define i32 @very_long_function_name_that_exceeds_eight_bytes_and_requires_continuation_records() {
+entry:
+  ; Create a large array to generate substantial text data
+  %arr = alloca [100 x i32], align 4
----------------
jh7370 wrote:

> Currently, yaml2obj for GOFF does not implement ESD record generation, so I will have to use llc.

It's very unusual to implement obj2yaml support for a piece of functionality before yaml2obj support. I would expect yaml2obj support to either be added before or at the same time as obj2yaml support.

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


More information about the llvm-commits mailing list