[all-commits] [llvm/llvm-project] 791411: [XCOFF] change the decoding of External symbol's f...

diggerlin via All-commits all-commits at lists.llvm.org
Thu Nov 3 07:37:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 791411a037b10d82a8c94e7aace277f644ef9360
      https://github.com/llvm/llvm-project/commit/791411a037b10d82a8c94e7aace277f644ef9360
  Author: zhijian <zhijian at ca.ibm.com>
  Date:   2022-11-03 (Thu, 03 Nov 2022)

  Changed paths:
    M llvm/test/tools/llvm-readobj/XCOFF/symbols-invalid.test
    M llvm/test/tools/llvm-readobj/XCOFF/symbols.test
    M llvm/tools/llvm-readobj/XCOFFDumper.cpp

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

Summary:

llvm-readobj decide whether to decode the external symbol's function auxiliary entry based on whether symbol is function or not currently. But the XCOFFSymbolRef::isFunction() do not work properly when -ffunction-sections is enabled. we will not decode the function auxiliary entry based on the XCOFFSymbolRef::isFunction()
we will decode the function auxiliary entry based on following:
According to the https://www.ibm.com/docs/en/aix/7.2?topic=formats-xcoff-object-file-format#XCOFF__c0f91ad419jbau

In XCOFF32, there are only "one csect Auxiliary Entry" and "a function auxiliary symbol table entry" for the C_EXT, C_WEAKEXT, and C_HIDEXT Symbols. and By convention, the csect auxiliary entry in an XCOFF32 file must be the last auxiliary entry for any external symbol that has more than one auxiliary entry( that means for the C_EXT, C_WEAKEXT, and C_HIDEXT Symbols. if there more than one auxiliary Entries. we look the last one as csect auxiliary entry. and others auxiliary entries as function entries).

Reviewers: Hubert Tong, James Henderson
Differential Revision: https://reviews.llvm.org/D136950




More information about the All-commits mailing list