The nm docs say: 'n' The symbol is in the read-only data section. ... 'R' 'r' The symbol is in a read only data section. I think it would be useful if the difference between 'n' and 'r' was documented.
Hi Tom, It is not clear to me how the 'n' symbol type is ever generated, but the code in bfd/syms.c:decode_section_type() makes it clear that the description in the documentation is wrong. So how about this rewording: 'n' The symbol is in a non-data, non-code read-only section. Cheers Nick
Thanks Nick. That looks good to me. I also wonder if that could ever happen. Maybe it's possible for some format but not ELF?
The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3a8be578d658b1cad3579aea0f5ce4883de21e6b commit 3a8be578d658b1cad3579aea0f5ce4883de21e6b Author: Nick Clifton <nickc@redhat.com> Date: Tue Feb 7 11:40:46 2023 +0000 Fix documentation of the 'n' symbol type displayed by nm. PR 30080 * doc/binutils.texi (nm): Update description of the 'n' symbol type.
Hi Tom, Yeah - I suspect some PE/COFF special symbol type, but I could not find any way actually trigger nm to output that type... Anyway I have checked in the suggested change, although I extended it to note that 'n' symbols are also not debugging symbols. Cheers Nick
See commit a3b6428fe79.
(In reply to Andreas Schwab from comment #5) > See commit a3b6428fe79. .comment and .note eh ? I wonder why they would have symbols ? Still fair enough, such symbols can obviously be produced. I stand by the updated description of the 'n' symbol though. Thanks for pointing out that commit Andreas. Cheers Nick