[llvm] [llvm-nm][GOFF] Support symbol types and sizes (PR #207119)

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 09:23:52 PDT 2026


================
@@ -26,9 +26,9 @@ entry:
   ret void
 }
 
-; CHECK-DAG: {{^[0-9A-Fa-f]+}} {{0*4}} D GlobalData
-; CHECK-DAG: {{^[0-9A-Fa-f]+}} {{0*4}} d LocalData
-; CHECK-DAG: {{^[0-9A-Fa-f]+}} {{[0-9A-Fa-f]+}} T GlobalFunc
-; CHECK-DAG: {{^[0-9A-Fa-f]+}} {{[0-9A-Fa-f]+}} t LocalFunc
-; CHECK-DAG: {{^[0-9A-Fa-f]+}} {{[0-9A-Fa-f]+}} T UseExternFunc
-; CHECK-DAG: {{^ *}}U ExternFunc
+; CHECK-DAG: {{^[0-9A-Fa-f]+}} 0000000000000004 D GlobalData
+; CHECK-DAG: {{^[0-9A-Fa-f]+}} 0000000000000004 d LocalData
+; CHECK-DAG: {{^[0-9A-Fa-f]+}} 0000000000000000 T GlobalFunc
----------------
amy-kwan wrote:

It appears functions here are LD (label definitions), and that LD records do not set a length field explicitly (the field remains as 0 as far as I can tell in `llvm/lib/MC/GOFF/GOFFObjectWriter.cpp`. 

The `Length` field seems to only be meaningful for ED and PR records, and the `GlobalData` and `LocalData` here are PR records. @redstar please feel free to correct me if I am mistaken.

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


More information about the llvm-commits mailing list