[PATCH] D63327: [docs][llvm-nm] Improve symbol code documentation

Michael Trent via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 15 00:12:11 PDT 2019


mtrent added a comment.

All this looks reasonable, but my grasp of Mach-O is not as complete as I would like, and I have some questions for you.



================
Comment at: docs/CommandGuide/llvm-nm.rst:65
 
-t
+ Mach-O: absolute symbol or symbol from an unknown section.
 
----------------
I am not sure about the "Absolute Symbol" note. Can you point me at why you think that's what it means?

The historical documentation for 's' is "A symbol in a section that is not in __TEXT, __DATA (non-BSS), or in __DATA (BSS). I'd hate to call that "unknown" because "undefined" is such a strong concept and they start with  the same letter and are easy to confuse. Pragmatically, you can use directives to tell clang to write symbols into any arbitrary segment/section; and symbols defined in such a way would be listed as "s". So it's not that they're "unknown" as they are "uncommon" or perhaps "uncanonical." For the sake of  documentation, it might be best to say "Mach-O: symbol not in __TEXT or __DATA. 


================
Comment at: docs/CommandGuide/llvm-nm.rst:69
 
-T
+ Read-only data object.
 
----------------
Hmm ... I don't *think* Mach-O will print this value. But, please let me know if you know otherwise, and thanks for bringing this to my attention.


================
Comment at: docs/CommandGuide/llvm-nm.rst:97
 
- Local data object
+ Weak symbol definition. Multiple definitions link together into zero or one definitions.
 
----------------
I believe we do not print w/W for Mach-O files. If you know otherwise, please let me know.


================
Comment at: docs/CommandGuide/llvm-nm.rst:101
 
- Global data object
+ Mach-O: N_STAB symbol.
 
----------------
Yes, that's what the documentation says ... I've been looking for an example ... 


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63327/new/

https://reviews.llvm.org/D63327





More information about the llvm-commits mailing list