[llvm] [XCOFF] make related SD symbols as isFunction (PR #69553)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 01:12:48 PST 2023
================
@@ -0,0 +1,56 @@
+## Check that llvm-objdump --syms reports an error when
+## the symbol type in the csect aux entry of a symbol is not valid.
+
+## Check XCOFF32
+# RUN: yaml2obj --docnum=1 %s -o %t1
+# RUN: not llvm-objdump --syms %t1 2>&1 | FileCheck %s -DOBJ=%t1 --check-prefix=XCOFF32
+
+# XCOFF32: error: '[[OBJ]]': Symbol csect aux entry with index 2 has invalid symbol type 5
+
+--- !XCOFF
+FileHeader:
+ MagicNumber: 0x1DF
+Sections:
+ - Name: .text
+ Flags: [ STYP_TEXT ]
+Symbols:
+ - Name: .file
+ Section: N_DEBUG
+ NumberOfAuxEntries: 0
+ Type: 0x0
+ StorageClass: C_FILE
+ - Name: test
+ Section: .text
+ NumberOfAuxEntries: 1
+ StorageClass: C_EXT
+ AuxEntries:
+ - Type: AUX_CSECT
+ SymbolAlignmentAndType: 5
+ StorageMappingClass: XMC_PR
+
+## Check XCOFF64
+# RUN: yaml2obj --docnum=2 %s -o %t2
+# RUN: not llvm-objdump --syms %t2 2>&1 | FileCheck %s -DOBJ=%t2 --check-prefix=XCOFF64
+
+# XCOFF64: error: '[[OBJ]]': Symbol csect aux entry with index 2 has invalid symbol type 5
+
+--- !XCOFF
----------------
jh7370 wrote:
If I'm not mistaken, the only difference between this and the other YAML is the MagicNumber. Assuming that's the case, please use only one YAML doc and use the yaml2obj -D option to specify the value of that field.
https://github.com/llvm/llvm-project/pull/69553
More information about the llvm-commits
mailing list