[llvm] Support big endian in llvm-symbolizer's data location dwarf info parser (PR #67284)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 00:31:10 PDT 2023


================
@@ -0,0 +1,154 @@
+; REQUIRES: powerpc-registered-target
+; RUN: llc -filetype=obj -o %t -mtriple=powerpc-aix-ibm-xcoff < %s
+; RUN: llvm-symbolizer --obj=%t 'DATA 0x60' 'DATA 0x61' 'DATA 0x64' 'DATA 0X68' \
+; RUN:   'DATA 0x90' 'DATA 0x94' 'DATA 0X98' | \
+; RUN:   FileCheck %s
+
+;; This files tests llvm-symbolizer can successfully symbolize the data symbol
+;; from the DWARF info on AIX. Note that AIX is big endian.
+
+; CHECK: bss_global
+; CHECK-NEXT: 96 4
+; CHECK-NEXT: /t.cpp:1
+; CHECK-EMPTY:
+
+; CHECK: bss_global
+; CHECK-NEXT: 96 4
+; CHECK-NEXT: /t.cpp:1
+; CHECK-EMPTY:
+
+; CHECK: data_global
+; CHECK-NEXT: 100 4
+; CHECK-NEXT: /t.cpp:2
+; CHECK-EMPTY:
+
+; CHECK: str
----------------
jh7370 wrote:

This needs an explanation as to why it is different to e.g. `data_global`.

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


More information about the llvm-commits mailing list