[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:12:56 PDT 2021


DiggerLin created this revision.
DiggerLin added reviewers: jhenderson, Esme, sfertile, hubert.reinterpretcast, daltenty, PowerPC, MaskRay.
Herald added subscribers: rupprecht, mgrang, hiraditya.
DiggerLin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

the patch implement of following functionality.

1. export the symbols of the xcoff archive  or object files. (export the extern and extern weak symbol)
2. delete the duplicate export symbols (which has same symbol name and visibility)
3. sort the export symbols.
4. print out the  unique and sorted export symbols (print the symbol name and visibility).

there new options are add in the patch

1. --export-unique-symbol (enable the functionality of export unique symbol for xcoff)
2. --exclude-weak (exclude the weak symbol from be exporting)
3. --exclude-rsrc (exclude the symbol name begin with "__rsrc" from be exporting.

The patch has the same functionality as 
IBM CreateExportList <https://www.ibm.com/docs/en/xl-c-aix/13.1.0?topic=library-exporting-symbols-createexportlist-utility>
The patch has copied same code from patch https://reviews.llvm.org/D82549[AIX][XCOFF] parsing xcoff object file auxiliary header


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112735

Files:
  llvm/docs/CommandGuide/llvm-objdump.rst
  llvm/include/llvm/BinaryFormat/XCOFF.h
  llvm/include/llvm/Object/SymbolicFile.h
  llvm/include/llvm/Object/XCOFFObjectFile.h
  llvm/lib/Object/XCOFFObjectFile.cpp
  llvm/test/tools/llvm-objdump/XCOFF/Inputs/exp_sym.o
  llvm/test/tools/llvm-objdump/XCOFF/Inputs/libtest_sharedobj.a
  llvm/test/tools/llvm-objdump/XCOFF/Inputs/tf-rsrc-gcc.o
  llvm/test/tools/llvm-objdump/XCOFF/export_sym_list_ar.test
  llvm/test/tools/llvm-objdump/XCOFF/export_sym_list_obj.test
  llvm/tools/llvm-objdump/ObjdumpOpts.td
  llvm/tools/llvm-objdump/XCOFFDump.cpp
  llvm/tools/llvm-objdump/XCOFFDump.h
  llvm/tools/llvm-objdump/llvm-objdump.cpp
  llvm/tools/llvm-objdump/llvm-objdump.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112735.383076.patch
Type: text/x-patch
Size: 21412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211028/28b72f82/attachment-0001.bin>


More information about the llvm-commits mailing list