[PATCH] D112735: export unique symbol list for xcoff with llvm-objdump new option "--export-unique-symbol"

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 10:35:37 PDT 2021


DiggerLin marked an inline comment as done.
DiggerLin added inline comments.


================
Comment at: llvm/include/llvm/Object/SymbolicFile.h:122
                                  // (IR only)
+    SF_Protected = 1U << 12,     // Symbol has protected visibility
+    SF_Internal = 1U << 13       // Symbol has internal visibility
----------------
MaskRay wrote:
> I don't think we need new bits.
> 
> If internal visibility has similar behavior with hidden visibility, just reuse it or not set symbol properties at all.
> 
> I am mostly concerned with the fact that BFD style describing all binary format's every symbol property simply does not work.
we need the "protected" visibility in xcoff object file.

The AIX linker  accepts 4 of such visibility attribute types:

export: Symbol is exported with the global export attribute.
hidden: Symbol is not exported.
protected: Symbol is exported but cannot be rebound (preempted), even if runtime linking is being used.
internal: Symbol is not exported. The address of the symbol must not be provided to other programs or shared objects, but the linker does not verify this.

 please  reference 
1. [[ https://www.ibm.com/docs/en/aix/7.1?topic=formats-xcoff-object-file-format | xcoff-object-file-format ]] . (search "Symbol visibility" in file". )

2. https://developer.ibm.com/articles/au-aix-symbol-visibility/ , search 'STV_PROTECTED"



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112735



More information about the llvm-commits mailing list