summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2019-06-24 09:53:02 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2019-06-24 09:53:02 +0000
commit3519d5535a4c0ea12cb70a06b1d7fb8bf39fb781 (patch)
tree114a0a2b3e9a7371213cd20b9e3baec99d821ed0
parenta5bb7b6c20e2812da265a31624fc49f41dc6ff04 (diff)
downloadbcm5719-llvm-3519d5535a4c0ea12cb70a06b1d7fb8bf39fb781.tar.gz
bcm5719-llvm-3519d5535a4c0ea12cb70a06b1d7fb8bf39fb781.zip
[docs][llvm-nm] Improve symbol code documentation
The existing symbol code documentation was very incomplete. This patch adds the missing codes, and defines them based on the current code behaviour. Fixes https://bugs.llvm.org/show_bug.cgi?id=42231. Reviewed by: rupprecht, mtrent, MaskRay Differential Revision: https://reviews.llvm.org/D63327 llvm-svn: 364171
-rw-r--r--llvm/docs/CommandGuide/llvm-nm.rst85
1 files changed, 70 insertions, 15 deletions
diff --git a/llvm/docs/CommandGuide/llvm-nm.rst b/llvm/docs/CommandGuide/llvm-nm.rst
index 874a184664b..dabc83cce6c 100644
--- a/llvm/docs/CommandGuide/llvm-nm.rst
+++ b/llvm/docs/CommandGuide/llvm-nm.rst
@@ -22,39 +22,94 @@ hexadecimal address, followed by a type code character, followed by a name, for
each symbol. One record is printed per line; fields are separated by spaces.
When the address is omitted, it is replaced by 8 spaces.
-Type code characters currently supported, and their meanings, are as follows:
+Type code characters currently supported, and their meanings, are as follows.
+Where both lower and upper-case characters are listed for the same meaning, a
+lower-case character represents a local symbol, whilst an upper-case character
+represents a global (external) symbol:
-U
- Named object is referenced but undefined in this bitcode file
+a, A
+
+ Absolute symbol.
+
+b, B
+
+ Unitialized data (bss) object.
C
- Common (multiple definitions link together into one def)
+ Common symbol. Multiple definitions link together into one definition.
-W
+d, D
+
+ Writable data object.
+
+i, I
+
+ COFF: .idata symbol or symbol in a section with IMAGE_SCN_LNK_INFO set.
+
+n
+
+ ELF: local symbol from non-alloc section.
+
+ COFF: debug symbol.
+
+N
+
+ ELF: debug section symbol, or global symbol from non-alloc section.
+
+s, S
- Weak reference (multiple definitions link together into zero or one definitions)
+ COFF: section symbol.
-t
+ Mach-O: absolute symbol or symbol from a section other than __TEXT_EXEC __text,
+ __TEXT __text, __DATA __data, or __DATA __bss.
- Local function (text) object
+r, R
-T
+ Read-only data object.
- Global function (text) object
+t, T
-d
+ Code (text) object.
+
+u
+
+ ELF: GNU unique symbol.
+
+U
+
+ Named object is undefined in this file.
+
+v
+
+ ELF: Undefined weak object. It is not a link failure if the object is not
+ defined.
+
+V
+
+ ELF: Defined weak object symbol. This definition will only be used if no
+ regular definitions exist in a link. If multiple weak definitions and no
+ regular definitons exist, one of the weak definitions will be used.
+
+w
+
+ Undefined weak symbol other than an ELF object symbol. It is not a link failure
+ if the symbol is not defined.
+
+W
- Local data object
+ Defined weak symbol other than an ELF object symbol. This definition will only
+ be used if no regular definitions exist in a link. If multiple weak definitions
+ and no regular definitons exist, one of the weak definitions will be used.
-D
+\-
- Global data object
+ Mach-O: N_STAB symbol.
?
- Something unrecognizable
+ Something unrecognizable.
Because LLVM bitcode files typically contain objects that are not considered to
have addresses until they are linked into an executable image or dynamically
OpenPOWER on IntegriCloud