[PATCH] D118193: [llvm-nm] add a new option --bit-mode to specify the type of object file llvm-nm should examine
Digger Lin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 28 12:34:42 PST 2022
DiggerLin added a comment.
In D118193#3271123 <https://reviews.llvm.org/D118193#3271123>, @MaskRay wrote:
> So I just found https://www.ibm.com/docs/en/aix/7.1?topic=n-nm-command
>
> If the intention is to support AIX nm -X, I think it is fine because GNU nm's manpage says `-X This option is ignored for compatibility with the AIX version of nm. It takes one parameter which must be the string 32_64. The default mode of AIX nm corresponds to -X 32, which is not supported by GNU nm.`
> For other short options I would be concerned if there could be a potential conflict with GNU nm.
>
> For the long option `--bit-mode`, I don't know whether it is necessary.
I will remove long option `--bit-mode` ,
Since the llvm-nm can dump a 64bit object file without any errror prompt.
//bash> llvm-nm option-bit-mode.test.tmp64.o
0000000000000000 D var64
//
but in aix nm, if we dump symbol of 64bit object file, it will have
//bash-5.0$ nm option-bit-mode.test.tmp64.o
0654-210 option-bit-mode.test.tmp64.o is not valid in the current object file mode.
Use the -X option to specify the desired object mo//de.
I think it maybe better to keep the default -X Value to "any" for llvm-nm , setting default value of -X to "any" will keep llvm-nm current behavior without -X option.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118193/new/
https://reviews.llvm.org/D118193
More information about the llvm-commits
mailing list