[PATCH] D158004: llvm-nm ignore the Import symbol file for the --export-symbol option.
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 18 10:51:17 PDT 2023
DiggerLin added inline comments.
================
Comment at: llvm/tools/llvm-nm/llvm-nm.cpp:2267-2270
+ const char *BuffStart = (*BufferOrErr)->getBufferStart();
+ if (ExportSymbols && (*BufferOrErr)->getBufferSize() >= 2 &&
+ BuffStart[0] == '#' && BuffStart[1] == '!')
+ return SymbolList;
----------------
hubert.reinterpretcast wrote:
> DiggerLin wrote:
> > jhenderson wrote:
> > > Should this be limited to AIX or similar in some way? Certainly, the comment should highlight that these import files are specific to AIX, as the format is not a generic format that all systems follow. Something like "Ignore AIX import symbol files (these files start with "#!"), when exporting symbols."
> > >
> > > I'd also strongly consider moving the identification code into the `createBinary` tree. See my out-of-line comment for more detail.
> > it only limit to AIX Import symbol File.
> @jhenderson, do you have a suggestion on how to limit it in such a way? I was under the impression that the tools were designed to work in cross-compilation environments. A host-environment-based or build configuration property could be employed, but I think your input on the choice is needed.
"Ignore AIX import symbol files (these files start with "#!"), when exporting symbols."
since the import symbol files only used by linker
I am prefer to
"Ignore AIX linker import files (these files start with "#!"), when exporting symbols."
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158004/new/
https://reviews.llvm.org/D158004
More information about the llvm-commits
mailing list