[llvm] [XCOFF] make related SD symbols as isFunction (PR #69553)

Chen Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 22:19:08 PDT 2023


https://github.com/chenzheng1030 updated https://github.com/llvm/llvm-project/pull/69553

>From 415b078ea91e9b965482b1fd7b0d448d9f3b8f3b Mon Sep 17 00:00:00 2001
From: Chen Zheng <czhengsz at cn.ibm.com>
Date: Wed, 18 Oct 2023 21:23:15 -0400
Subject: [PATCH] set sd function symbol true for isFunction

---
 .../Symbolize/SymbolizableObjectFile.h        | 18 ++++++++++-
 .../Symbolize/SymbolizableObjectFile.cpp      | 31 +++++++++++++++++--
 llvm/lib/Object/XCOFFObjectFile.cpp           |  6 ++--
 .../CodeGen/PowerPC/aix-alias-alignment-2.ll  |  2 +-
 .../CodeGen/PowerPC/aix-alias-alignment.ll    |  2 +-
 llvm/test/CodeGen/PowerPC/aix-text.ll         | 16 +++++-----
 llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll   |  2 +-
 .../CodeGen/PowerPC/aix-xcoff-funcsect.ll     | 20 ++++++------
 .../test/CodeGen/PowerPC/pgo-ref-directive.ll |  4 +--
 llvm/test/MC/PowerPC/aix-file-symbols-empty.s |  2 +-
 llvm/test/MC/PowerPC/aix-file-symbols.s       |  2 +-
 .../XCOFF/disassemble-symbol-priority.ll      |  5 ++-
 .../llvm-objdump/XCOFF/symbol-table.test      |  4 +--
 .../tools/llvm-symbolizer/xcoff-sd-symbol.ll  |  4 +--
 14 files changed, 80 insertions(+), 38 deletions(-)

diff --git a/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableObjectFile.h b/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableObjectFile.h
index 075dbe3e0e372ed..fc113d548060fbe 100644
--- a/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableObjectFile.h
+++ b/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableObjectFile.h
@@ -83,8 +83,24 @@ class SymbolizableObjectFile : public SymbolizableModule {
     // getNameFromSymbolTable.
     uint32_t ELFLocalSymIdx;
 
+    // None if this is not a XCOFF local symbol.
+    enum XCOFFSymbolType { None, LD, SD };
+    XCOFFSymbolType Type;
+
     bool operator<(const SymbolDesc &RHS) const {
-      return Addr != RHS.Addr ? Addr < RHS.Addr : Size < RHS.Size;
+      if (Addr != RHS.Addr)
+        return Addr < RHS.Addr;
+
+      if (Type != None) {
+        // This is a XCOFF symbol. For XCOFF, XTY_SD symbol and its first XTY_LD
+        // symbol have same addresses, the symbol size of XTY_SD symbol is the
+        // size of the section while symbol size of the XTY_LD symbol is 0, but
+        // we need the XTY_LD symbol instead of the XTY_SD symbol.
+        if (Type == LD && RHS.Type == SD)
+          return false;
+      }
+
+      return Size < RHS.Size;
     }
   };
   std::vector<SymbolDesc> Symbols;
diff --git a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
index 6b8068a531c05fa..08914ad20957efb 100644
--- a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
@@ -18,6 +18,7 @@
 #include "llvm/Object/ELFObjectFile.h"
 #include "llvm/Object/ObjectFile.h"
 #include "llvm/Object/SymbolSize.h"
+#include "llvm/Object/XCOFFObjectFile.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/DataExtractor.h"
 #include "llvm/TargetParser/Triple.h"
@@ -134,7 +135,8 @@ Error SymbolizableObjectFile::addCoffExportSymbols(
     uint32_t NextOffset = I != E ? I->Offset : Export.Offset + 1;
     uint64_t SymbolStart = ImageBase + Export.Offset;
     uint64_t SymbolSize = NextOffset - Export.Offset;
-    Symbols.push_back({SymbolStart, SymbolSize, Export.Name, 0});
+    Symbols.push_back(
+        {SymbolStart, SymbolSize, Export.Name, 0, SymbolDesc::None});
   }
   return Error::success();
 }
@@ -215,7 +217,30 @@ Error SymbolizableObjectFile::addSymbol(const SymbolRef &Symbol,
 
   if (Obj.isELF() && ELFSymbolRef(Symbol).getBinding() != ELF::STB_LOCAL)
     ELFSymIdx = 0;
-  Symbols.push_back({SymbolAddress, SymbolSize, SymbolName, ELFSymIdx});
+
+  SymbolDesc::XCOFFSymbolType Type = SymbolDesc::None;
+  if (Obj.isXCOFF()) {
+    const XCOFFSymbolRef XCOFFSymbol =
+        cast<XCOFFObjectFile>(Obj).toSymbolRef(Symbol.getRawDataRefImpl());
+    // If this is not a Csect symbol, ignore this symbol.
+    if (!XCOFFSymbol.isCsectSymbol())
+      return Error::success();
+
+    Expected<XCOFFCsectAuxRef> ExpCsectAuxEnt =
+        XCOFFSymbol.getXCOFFCsectAuxRef();
+    // If there is no aux entry, ignore this symbol.
+    if (!ExpCsectAuxEnt) {
+      consumeError(ExpCsectAuxEnt.takeError());
+      return Error::success();
+    }
+
+    if (ExpCsectAuxEnt.get().getSymbolType() == XCOFF::XTY_SD)
+      Type = SymbolDesc::SD;
+    else if (ExpCsectAuxEnt.get().getSymbolType() == XCOFF::XTY_LD)
+      Type = SymbolDesc::LD;
+  }
+
+  Symbols.push_back({SymbolAddress, SymbolSize, SymbolName, ELFSymIdx, Type});
   return Error::success();
 }
 
@@ -234,7 +259,7 @@ uint64_t SymbolizableObjectFile::getModulePreferredBase() const {
 bool SymbolizableObjectFile::getNameFromSymbolTable(
     uint64_t Address, std::string &Name, uint64_t &Addr, uint64_t &Size,
     std::string &FileName) const {
-  SymbolDesc SD{Address, UINT64_C(-1), StringRef(), 0};
+  SymbolDesc SD{Address, UINT64_C(-1), StringRef(), 0, SymbolDesc::None};
   auto SymbolIterator = llvm::upper_bound(Symbols, SD);
   if (SymbolIterator == Symbols.begin())
     return false;
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp
index 4c192aa37a7ecc7..3882d5951e7e2d1 100644
--- a/llvm/lib/Object/XCOFFObjectFile.cpp
+++ b/llvm/lib/Object/XCOFFObjectFile.cpp
@@ -1242,10 +1242,8 @@ bool XCOFFSymbolRef::isFunction() const {
 
   const XCOFFCsectAuxRef CsectAuxRef = ExpCsectAuxEnt.get();
 
-  // A function definition should be a label definition.
-  // FIXME: This is not necessarily the case when -ffunction-sections is
-  // enabled.
-  if (!CsectAuxRef.isLabel())
+  // A function definition should not be a common type symbol.
+  if (CsectAuxRef.getSymbolType() == XCOFF::XTY_CM)
     return false;
 
   if (CsectAuxRef.getStorageMappingClass() != XCOFF::XMC_PR)
diff --git a/llvm/test/CodeGen/PowerPC/aix-alias-alignment-2.ll b/llvm/test/CodeGen/PowerPC/aix-alias-alignment-2.ll
index 209f0e9c38385c7..fab134d73a3eab7 100644
--- a/llvm/test/CodeGen/PowerPC/aix-alias-alignment-2.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-alias-alignment-2.ll
@@ -59,7 +59,7 @@ define void @foo3(%struct.B %a1) {
 
 ; SYM:      SYMBOL TABLE:
 ; SYM-NEXT: 00000000      df *DEBUG*	00000000 <stdin>
-; SYM-NEXT: 00000000 l       .text	0000008a 
+; SYM-NEXT: 00000000 l     F .text	0000008a 
 ; SYM-NEXT: 00000000 g     F .text (csect: ) 	00000000 .foo1
 ; SYM-NEXT: 00000030 g     F .text (csect: ) 	00000000 .foo2
 ; SYM-NEXT: 00000060 g     F .text (csect: ) 	00000000 .foo3
diff --git a/llvm/test/CodeGen/PowerPC/aix-alias-alignment.ll b/llvm/test/CodeGen/PowerPC/aix-alias-alignment.ll
index a1ad80481adf160..0f08ff4ef6aefca 100644
--- a/llvm/test/CodeGen/PowerPC/aix-alias-alignment.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-alias-alignment.ll
@@ -62,7 +62,7 @@ define void @foo(i32 %a1, i32 %a2, i32 %a3) {
 
 ; SYM:      SYMBOL TABLE:
 ; SYM-NEXT: 00000000      df *DEBUG*	00000000 <stdin>
-; SYM-NEXT: 00000000 l       .text	00000029 
+; SYM-NEXT: 00000000 l     F .text	00000029 
 ; SYM-NEXT: 00000000 g     F .text (csect: ) 	00000000 .foo
 ; SYM-NEXT: 0000002c l       .data	00000008 .data
 ; SYM-NEXT: 0000002c g     O .data (csect: .data) 	00000000 _MergedGlobals
diff --git a/llvm/test/CodeGen/PowerPC/aix-text.ll b/llvm/test/CodeGen/PowerPC/aix-text.ll
index a0d1d0e38d50225..50dc723d42cc271 100644
--- a/llvm/test/CodeGen/PowerPC/aix-text.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-text.ll
@@ -17,18 +17,18 @@ entry:
   ret i32 2
 }
 
-; CHECKFS32: 00000000 l       .text  00000000 (idx: {{[[:digit:]]*}}) [PR]
-; CHECKFS32-NEXT: 00000000 g       .text  {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) .text[PR]
-; CHECKFS32-NEXT: {{([[:xdigit:]]{8})}} g       .text  {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) .text2[PR]
+; CHECKFS32: 00000000 l     F .text  00000000 (idx: {{[[:digit:]]*}}) [PR]
+; CHECKFS32-NEXT: 00000000 g     F .text  {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) .text[PR]
+; CHECKFS32-NEXT: {{([[:xdigit:]]{8})}} g     F .text  {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) .text2[PR]
 
-; CHECKFS64: 0000000000000000 l       .text  0000000000000000 
-; CHECKFS64-NEXT: 0000000000000000 g       .text  {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) .text[PR]
-; CHECKFS64-NEXT: {{([[:xdigit:]]{16})}} g       .text  {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) .text2[PR]
+; CHECKFS64: 0000000000000000 l     F .text  0000000000000000 
+; CHECKFS64-NEXT: 0000000000000000 g     F .text  {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) .text[PR]
+; CHECKFS64-NEXT: {{([[:xdigit:]]{16})}} g    F .text  {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) .text2[PR]
 
-; CHECK32: 00000000 l       .text  {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) [PR]
+; CHECK32: 00000000 l      F .text  {{([[:xdigit:]]{8})}} (idx: {{[[:digit:]]*}}) [PR]
 ; CHECK32-NEXT: {{([[:xdigit:]]{8})}} g     F .text (csect: (idx: {{[[:digit:]]*}}) [PR])   00000000 (idx: {{[[:digit:]]*}}) .text
 ; CHECK32-NEXT: {{([[:xdigit:]]{8})}} g     F .text (csect: (idx: {{[[:digit:]]*}}) [PR])   00000000 (idx: {{[[:digit:]]*}}) .text2
 
-; CHECK64: 0000000000000000 l       .text  {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) [PR]
+; CHECK64: 0000000000000000 l      F .text  {{([[:xdigit:]]{16})}} (idx: {{[[:digit:]]*}}) [PR]
 ; CHECK64-NEXT: {{([[:xdigit:]]{16})}} g     F .text (csect: (idx: {{[[:digit:]]*}}) [PR])   0000000000000000 (idx: {{[[:digit:]]*}}) .text
 ; CHECK64-NEXT: {{([[:xdigit:]]{8})}} g     F .text (csect: (idx: {{[[:digit:]]*}}) [PR])   0000000000000000 (idx: {{[[:digit:]]*}}) .text2
diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll
index db6071653b6bcca..ea236c7c582a397 100644
--- a/llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-cold.ll
@@ -3,7 +3,7 @@
 
 ; CHECK:      SYMBOL TABLE:
 ; CHECK-NEXT: 0000000000000000      df *DEBUG* 0000000000000000 <stdin>
-; CHECK-NEXT: 0000000000000000 l       .text   000000000000001e 
+; CHECK-NEXT: 0000000000000000 l     F .text   000000000000001e 
 ; CHECK-NEXT: 0000000000000000 g     F .text (csect: )  0000000000000000 .cold_fun
 ; CHECK-NEXT: 0000000000000020 g     O .data   0000000000000018 cold_fun
 
diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll
index 09c517c73dff296..bbfd808a140f378 100644
--- a/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll
+++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll
@@ -114,12 +114,12 @@ entry:
 ; XCOFF32-NEXT: 00000000      df *DEBUG*	00000000 (idx: 0) <stdin>
 ; XCOFF32-NEXT: 00000000         *UND*	00000000 (idx: 1) .extern_foo[PR]
 ; XCOFF32-NEXT: 00000000         *UND*	00000000 (idx: 3) extern_foo[DS]
-; XCOFF32-NEXT: 00000000 l       .text	00000000 (idx: 5) [PR]
-; XCOFF32-NEXT: 00000000 g       .text	00000019 (idx: 7) .foo[PR]
+; XCOFF32-NEXT: 00000000 l     F .text	00000000 (idx: 5) [PR]
+; XCOFF32-NEXT: 00000000 g     F .text	00000019 (idx: 7) .foo[PR]
 ; XCOFF32-NEXT: 00000000 g     F .text (csect: (idx: 7) .foo[PR]) 	00000000 (idx: 9) .alias_foo
-; XCOFF32-NEXT: 00000020 g       .text	00000020 .hidden (idx: 11) .hidden_foo[PR]
-; XCOFF32-NEXT: 00000040 g       .text	00000059 (idx: 13) .bar[PR]
-; XCOFF32-NEXT: 000000c0 l       .text	0000002a (idx: 15) .static_overalign_foo[PR]
+; XCOFF32-NEXT: 00000020 g     F .text	00000020 .hidden (idx: 11) .hidden_foo[PR]
+; XCOFF32-NEXT: 00000040 g     F .text	00000059 (idx: 13) .bar[PR]
+; XCOFF32-NEXT: 000000c0 l     F .text	0000002a (idx: 15) .static_overalign_foo[PR]
 ; XCOFF32-NEXT: 000000ec g     O .data	0000000c (idx: 17) foo[DS]
 ; XCOFF32-NEXT: 000000ec g     O .data (csect: (idx: 17) foo[DS]) 	00000000 (idx: 19) alias_foo
 ; XCOFF32-NEXT: 000000f8 g     O .data	0000000c .hidden (idx: 21) hidden_foo[DS]
@@ -149,12 +149,12 @@ entry:
 ; XCOFF64-NEXT: 0000000000000000      df *DEBUG*	0000000000000000 (idx: 0) <stdin>
 ; XCOFF64-NEXT: 0000000000000000         *UND*	0000000000000000 (idx: 1) .extern_foo[PR]
 ; XCOFF64-NEXT: 0000000000000000         *UND*	0000000000000000 (idx: 3) extern_foo[DS]
-; XCOFF64-NEXT: 0000000000000000 l       .text	0000000000000000 (idx: 5) [PR]
-; XCOFF64-NEXT: 0000000000000000 g       .text	0000000000000019 (idx: 7) .foo[PR]
+; XCOFF64-NEXT: 0000000000000000 l     F .text	0000000000000000 (idx: 5) [PR]
+; XCOFF64-NEXT: 0000000000000000 g     F .text	0000000000000019 (idx: 7) .foo[PR]
 ; XCOFF64-NEXT: 0000000000000000 g     F .text (csect: (idx: 7) .foo[PR]) 	0000000000000000 (idx: 9) .alias_foo
-; XCOFF64-NEXT: 0000000000000020 g       .text	0000000000000020 .hidden (idx: 11) .hidden_foo[PR]
-; XCOFF64-NEXT: 0000000000000040 g       .text	0000000000000059 (idx: 13) .bar[PR]
-; XCOFF64-NEXT: 00000000000000c0 l       .text	000000000000002a (idx: 15) .static_overalign_foo[PR]
+; XCOFF64-NEXT: 0000000000000020 g     F .text	0000000000000020 .hidden (idx: 11) .hidden_foo[PR]
+; XCOFF64-NEXT: 0000000000000040 g     F .text	0000000000000059 (idx: 13) .bar[PR]
+; XCOFF64-NEXT: 00000000000000c0 l     F .text	000000000000002a (idx: 15) .static_overalign_foo[PR]
 ; XCOFF64-NEXT: 00000000000000f0 g     O .data	0000000000000018 (idx: 17) foo[DS]
 ; XCOFF64-NEXT: 00000000000000f0 g     O .data (csect: (idx: 17) foo[DS]) 	0000000000000000 (idx: 19) alias_foo
 ; XCOFF64-NEXT: 0000000000000108 g     O .data	0000000000000018 .hidden (idx: 21) hidden_foo[DS]
diff --git a/llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll b/llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll
index 480b44caaded7a5..7dd4d31fca3589f 100644
--- a/llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll
+++ b/llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll
@@ -122,8 +122,8 @@ entry:
 
 ; WITHVNDS-OBJ:      SYMBOL TABLE:
 ; WITHVNDS-OBJ-NEXT: 00000000      df *DEBUG*	00000000 <stdin>
-; WITHVNDS-OBJ-NEXT: 00000000 l       .text	00000008 
-; WITHVNDS-OBJ-NEXT: 00000000 g     F .text (csect: ) 	00000000 .main
+; WITHVNDS-OBJ-NEXT: 00000000 l     F .text	00000008 
+; WITHVNDS-OBJ-NEXT: 00000000 g     F .text (csect: )	00000000 .main
 ; WITHVNDS-OBJ-NEXT: 00000008 l       .text	00000006 __llvm_prf_names
 ; WITHVNDS-OBJ-NEXT: 00000010 l     O .data	00000008 __llvm_prf_cnts
 ; WITHVNDS-OBJ-NEXT: 00000018 l     O .data	00000008 __llvm_prf_data
diff --git a/llvm/test/MC/PowerPC/aix-file-symbols-empty.s b/llvm/test/MC/PowerPC/aix-file-symbols-empty.s
index e166eef7e3fd9f6..af69781d4932c95 100644
--- a/llvm/test/MC/PowerPC/aix-file-symbols-empty.s
+++ b/llvm/test/MC/PowerPC/aix-file-symbols-empty.s
@@ -9,6 +9,6 @@
 
 # CHECK:      SYMBOL TABLE:
 # CHECK-NEXT: 00000000      df *DEBUG*	00000000 .file
-# CHECK-NEXT: 00000000 l       .text	00000000 
+# CHECK-NEXT: 00000000 l     F .text	00000000 
 # CHECK-NEXT: 00000000 g     F .text (csect: ) 	00000000 .var1
 # CHECK-NEXT: 00000000 g     F .text (csect: ) 	00000000 .var2
diff --git a/llvm/test/MC/PowerPC/aix-file-symbols.s b/llvm/test/MC/PowerPC/aix-file-symbols.s
index 7ab0244f3c7141e..6f9d6341f345055 100644
--- a/llvm/test/MC/PowerPC/aix-file-symbols.s
+++ b/llvm/test/MC/PowerPC/aix-file-symbols.s
@@ -14,6 +14,6 @@
 # CHECK-NEXT: 00000000      df *DEBUG*	00000000 1.c
 # CHECK-NEXT: 00000000      df *DEBUG*	00000000 2.c
 # CHECK-NEXT: 00000000      df *DEBUG*	00000000 3.c
-# CHECK-NEXT: 00000000 l       .text	00000000 
+# CHECK-NEXT: 00000000 l     F .text	00000000 
 # CHECK-NEXT: 00000000 g     F .text (csect: ) 	00000000 .var1
 # CHECK-NEXT: 00000000 g     F .text (csect: ) 	00000000 .var2
diff --git a/llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-priority.ll b/llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-priority.ll
index 6db8451ea6a13b8..72c82fdc8b006f0 100644
--- a/llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-priority.ll
+++ b/llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-priority.ll
@@ -4,7 +4,10 @@
 ; CHECK: Disassembly of section .text:
 ; CHECK: 00000000 <.foo3>:
 ; CHECK: 00000020 <.foo4>:
-; CHECK: 00000040 <.foo>:
+
+;; FIXME: should show the function name instead of the section name.
+; CHECK: 00000040 <explicit_sec>:
+
 ; CHECK: 00000060 <.foo2>:
 
 define dso_local signext i32 @foo(i32 noundef signext %a) #0 section "explicit_sec" {
diff --git a/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test b/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test
index f8fc114f05a6206..109718e8552ae2d 100644
--- a/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test
+++ b/llvm/test/tools/llvm-objdump/XCOFF/symbol-table.test
@@ -68,7 +68,7 @@ entry:
 ; SYM:      SYMBOL TABLE:
 ; SYM-NEXT: 00000000      df *DEBUG*    00000000 <stdin>
 ; SYM-NEXT: 00000000         *UND*      00000000 ei
-; SYM-NEXT: 00000000 l       .text      00000091 
+; SYM-NEXT: 00000000 l     F .text      00000091 
 ; SYM-NEXT: 00000000 g     F .text (csect: )       00000000 .bar
 ; SYM-NEXT: 00000050 g     F .text (csect: )       00000000 .foo
 ; SYM-NEXT: 00000094 l       .text      00000013 L...str
@@ -90,7 +90,7 @@ entry:
 ; SYM-DES:      SYMBOL TABLE:
 ; SYM-DES-NEXT: 00000000      df *DEBUG*    00000000 (idx: 0) <stdin>
 ; SYM-DES-NEXT: 00000000         *UND*      00000000 (idx: 1) ei[UA]
-; SYM-DES-NEXT: 00000000 l       .text      00000091 (idx: 3) [PR]
+; SYM-DES-NEXT: 00000000 l     F .text      00000091 (idx: 3) [PR]
 ; SYM-DES-NEXT: 00000000 g     F .text (csect: (idx: 3) [PR])  00000000 (idx: 5) .bar
 ; SYM-DES-NEXT: 00000050 g     F .text (csect: (idx: 3) [PR])  00000000 (idx: 7) .foo
 ; SYM-DES-NEXT: 00000094 l       .text      00000013 (idx: 9) L...str[RO]
diff --git a/llvm/test/tools/llvm-symbolizer/xcoff-sd-symbol.ll b/llvm/test/tools/llvm-symbolizer/xcoff-sd-symbol.ll
index 781ac72933a1523..aedceb0227b8962 100644
--- a/llvm/test/tools/llvm-symbolizer/xcoff-sd-symbol.ll
+++ b/llvm/test/tools/llvm-symbolizer/xcoff-sd-symbol.ll
@@ -16,10 +16,10 @@ entry:
   ret void
 }
 
-; CHECK: ??
+; CHECK: .foo
 ; CHECK: ??:0:0
 ; CHECK-EMPTY:
 
-; CHECK: ??
+; CHECK: .foo1
 ; CHECK: ??:0:0
 ; CHECK-EMPTY:



More information about the llvm-commits mailing list