[all-commits] [llvm/llvm-project] fd3ba1: Title: Export unique symbol list with llvm-nm new ...

diggerlin via All-commits all-commits at lists.llvm.org
Thu Feb 17 08:38:04 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd3ba1f862f54811ff9f4663ff298ff02d9c3b70
      https://github.com/llvm/llvm-project/commit/fd3ba1f862f54811ff9f4663ff298ff02d9c3b70
  Author: zhijian <zhijian at ca.ibm.com>
  Date:   2022-02-17 (Thu, 17 Feb 2022)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-nm.rst
    M llvm/include/llvm/BinaryFormat/XCOFF.h
    M llvm/include/llvm/Object/XCOFFObjectFile.h
    M llvm/lib/Object/XCOFFObjectFile.cpp
    A llvm/test/tools/llvm-nm/XCOFF/export-symbols.test
    A llvm/test/tools/llvm-nm/bitcode-export-sym.test
    M llvm/tools/llvm-nm/Opts.td
    M llvm/tools/llvm-nm/llvm-nm.cpp

  Log Message:
  -----------
  Title: Export unique symbol list with llvm-nm new option "--export-symbols"

Summary:

the patch implement of following functionality.
1. export the symbols from archive or object files.
2. sort the export symbols. (based on same symbol name and visibility)
3. delete the duplicate export symbols (based on same symbol name and visibility)
4. print out the  unique and sorted export symbols (print the symbol name and visibility).

there are two new options are add in the patch
1. --export-symbols (enable the functionality of export unique symbol)
2. --no-rsrc (exclude the symbol name begin with "__rsrc" from be exporting from xcoff object file)

Export symbol list for xcoff object file has the same functionality as
The patch has the same functionality as
https://www.ibm.com/docs/en/xl-c-aix/13.1.0?topic=library-exporting-symbols-createexportlist-utility

Reviewers: James Henderson,Fangrui Song
Differential Revision: https://reviews.llvm.org/D112735




More information about the All-commits mailing list