[PATCH] D136950: [XCOFF] change the decoding of External symbol's function auxiliary entry in XCOFF32 for llvm-readobj

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 10:14:32 PDT 2022


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/XCOFF/symbols-invalid.test:12-13
 
-# RUN: yaml2obj %s --docnum=1 -DSTORAGECLASS='C_WEAKEXT' -o %t2
-# RUN: llvm-readobj --syms %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=CASE2
-
-# CASE2: warning: '[[FILE]]': the non-function C_WEAKEXT symbol at index 1 should have only 1 auxiliary entry, i.e. the CSECT auxiliary entry
-
-# RUN: yaml2obj %s --docnum=1 -DSTORAGECLASS='C_HIDEXT' -o %t3
-# RUN: llvm-readobj --syms %t3 2>&1 | FileCheck %s -DFILE=%t3 --check-prefix=CASE3
-
-# CASE3: warning: '[[FILE]]': the non-function C_HIDEXT symbol at index 1 should have only 1 auxiliary entry, i.e. the CSECT auxiliary entry
-
 # RUN: yaml2obj %s --docnum=1 -DSTORAGECLASS='C_STAT' -o %t4
 # RUN: llvm-readobj --syms %t4 2>&1 | FileCheck %s -DFILE=%t4 --check-prefix=CASE4
 
----------------
Minor: May want to re-number the cases.


================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:625
     for (int I = 1; I <= NumberOfAuxEntries; I++) {
-      if ((I == NumberOfAuxEntries && !Obj.is64Bit()) ||
-          !SymbolEntRef.isFunction())
+      if (I == NumberOfAuxEntries && !Obj.is64Bit())
         break;
----------------
I think we should have functional tests that demonstrate the new behaviour.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136950/new/

https://reviews.llvm.org/D136950



More information about the llvm-commits mailing list