[all-commits] [llvm/llvm-project] adc317: llvm-nm ignore the Import symbol file for the --ex...
diggerlin via All-commits
all-commits at lists.llvm.org
Wed Aug 30 12:46:21 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: adc317d36908f856821df94bd8983a3ec8dae148
https://github.com/llvm/llvm-project/commit/adc317d36908f856821df94bd8983a3ec8dae148
Author: zhijian <zhijian at ca.ibm.com>
Date: 2023-08-30 (Wed, 30 Aug 2023)
Changed paths:
M llvm/test/tools/llvm-nm/XCOFF/export-symbols.test
M llvm/tools/llvm-nm/llvm-nm.cpp
Log Message:
-----------
llvm-nm ignore the Import symbol file for the --export-symbol option.
Summary:
On AIX OS, clang may use llvm-nm to export the symbols from all input files (see https://github.com/llvm/llvm-project/blob/515c435e378b243b1be3da1587c9e206055f2c32/clang/lib/Driver/ToolChains/AIX.cpp#L236). However, the clang command-line may include import files (identified by them starting with #!). llvm-nm previously reported "invalid object file" errors for import files, meaning that the clang driver would fail to link when import files are included this way.
In this patch, llvm-nm is changed to ignore import files when the --export-symbol option, meaning that clang will now succeed in this case.
For more information about AIX import files, see https://www.ibm.com/docs/en/aix/7.3?topic=l-ld-command
Reviewers: Hubert Tong, James Henderson, MaskRay, Stephen Peckham
Differential Revision: https://reviews.llvm.org/D158004
More information about the All-commits
mailing list