summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeiya Nuta <nuta@seiya.me>2019-08-15 07:22:04 +0000
committerSeiya Nuta <nuta@seiya.me>2019-08-15 07:22:04 +0000
commit0a3b1b26287a6a71cc525aeb41a42f7db8a2bd8d (patch)
tree40b953e67196e3e52bc0d4a5ff3b67d13a95d5a9
parentd57d73daed3057ff48a1e6476a681b2ad46c268c (diff)
downloadbcm5719-llvm-0a3b1b26287a6a71cc525aeb41a42f7db8a2bd8d.tar.gz
bcm5719-llvm-0a3b1b26287a6a71cc525aeb41a42f7db8a2bd8d.zip
[llvm-readobj][MachO] Fix section type printing
Summary: Currently, llvm-readobj mistakenly decodes section type as section attribute. This patch fixes the bug and affected tests. Reviewers: JDevlieghere, jhenderson, rupprecht, alexshap, echristo Reviewed By: jhenderson, rupprecht, alexshap, echristo Subscribers: javed.absar, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66075 llvm-svn: 368974
-rw-r--r--llvm/test/MC/MachO/ARM/darwin-ARM-reloc.s6
-rw-r--r--llvm/test/MC/MachO/ARM/darwin-Thumb-reloc.s4
-rw-r--r--llvm/test/MC/MachO/ARM/relax-thumb-ldr-literal.s2
-rw-r--r--llvm/test/MC/MachO/absolute.s2
-rw-r--r--llvm/test/MC/MachO/absolutize.s4
-rw-r--r--llvm/test/MC/MachO/comm-1.s2
-rw-r--r--llvm/test/MC/MachO/darwin-complex-difference.s2
-rw-r--r--llvm/test/MC/MachO/darwin-x86_64-diff-relocs.s4
-rw-r--r--llvm/test/MC/MachO/darwin-x86_64-nobase-relocs.s2
-rw-r--r--llvm/test/MC/MachO/darwin-x86_64-reloc-offsets.s4
-rw-r--r--llvm/test/MC/MachO/data.s4
-rw-r--r--llvm/test/MC/MachO/debug_frame.s2
-rw-r--r--llvm/test/MC/MachO/diff-with-two-sections.s4
-rw-r--r--llvm/test/MC/MachO/direction_labels.s2
-rw-r--r--llvm/test/MC/MachO/file.s2
-rw-r--r--llvm/test/MC/MachO/indirect-symbols.s6
-rw-r--r--llvm/test/MC/MachO/jcc.s2
-rw-r--r--llvm/test/MC/MachO/lcomm-attributes.s4
-rw-r--r--llvm/test/MC/MachO/loc.s2
-rw-r--r--llvm/test/MC/MachO/pcrel-to-other-section.s4
-rw-r--r--llvm/test/MC/MachO/relax-recompute-align.s2
-rw-r--r--llvm/test/MC/MachO/reloc-pcrel-offset.s2
-rw-r--r--llvm/test/MC/MachO/section-align-1.s2
-rw-r--r--llvm/test/MC/MachO/section-align-2.s6
-rw-r--r--llvm/test/MC/MachO/section-flags.s4
-rw-r--r--llvm/test/MC/MachO/string-table.s2
-rw-r--r--llvm/test/MC/MachO/symbol-diff.s4
-rw-r--r--llvm/test/MC/MachO/symbol-flags.s4
-rw-r--r--llvm/test/MC/MachO/symbol-indirect.s6
-rw-r--r--llvm/test/MC/MachO/symbols-1.s4
-rw-r--r--llvm/test/MC/MachO/tbss.s4
-rw-r--r--llvm/test/MC/MachO/tdata.s4
-rw-r--r--llvm/test/MC/MachO/thread_init_func.s4
-rw-r--r--llvm/test/MC/MachO/tls.s8
-rw-r--r--llvm/test/MC/MachO/tlv-reloc.s6
-rw-r--r--llvm/test/MC/MachO/tlv.s4
-rw-r--r--llvm/test/MC/MachO/values.s4
-rw-r--r--llvm/test/MC/MachO/variable-exprs.s8
-rw-r--r--llvm/test/MC/MachO/weakdef.s6
-rw-r--r--llvm/test/MC/MachO/x86_32-optimal_nop.s4
-rw-r--r--llvm/test/MC/MachO/x86_32-sections.s72
-rw-r--r--llvm/test/MC/MachO/x86_32-symbols.s72
-rw-r--r--llvm/test/MC/MachO/x86_64-sections.s62
-rw-r--r--llvm/test/MC/MachO/zero-space.s4
-rw-r--r--llvm/test/MC/MachO/zerofill-1.s6
-rw-r--r--llvm/test/MC/MachO/zerofill-2.s4
-rw-r--r--llvm/test/MC/MachO/zerofill-3.s4
-rw-r--r--llvm/test/MC/MachO/zerofill-5.s4
-rw-r--r--llvm/test/MC/X86/cfi_def_cfa-crash.s2
-rw-r--r--llvm/test/tools/dsymutil/X86/dsym-companion.test26
-rw-r--r--llvm/test/tools/llvm-readobj/macho-sections.test314
-rw-r--r--llvm/test/tools/llvm-readobj/macho-universal-x86_64.i386.test22
-rw-r--r--llvm/test/tools/llvm-readobj/sections-ext.test40
-rw-r--r--llvm/test/tools/llvm-readobj/sections.test42
-rw-r--r--llvm/tools/llvm-readobj/MachODumper.cpp27
55 files changed, 596 insertions, 257 deletions
diff --git a/llvm/test/MC/MachO/ARM/darwin-ARM-reloc.s b/llvm/test/MC/MachO/ARM/darwin-ARM-reloc.s
index 31709076336..f9a8d539f76 100644
--- a/llvm/test/MC/MachO/ARM/darwin-ARM-reloc.s
+++ b/llvm/test/MC/MachO/ARM/darwin-ARM-reloc.s
@@ -47,7 +47,7 @@ Lsc0_0:
@ CHECK: Alignment: 0
@ CHECK: RelocationOffset: 0x1A8
@ CHECK: RelocationCount: 2
-@ CHECK: Type: 0x0
+@ CHECK: Type: Regular (0x0)
@ CHECK: Attributes [ (0x800004)
@ CHECK: PureInstructions (0x800000)
@ CHECK: SomeInstructions (0x4)
@@ -68,7 +68,7 @@ Lsc0_0:
@ CHECK: Alignment: 0
@ CHECK: RelocationOffset: 0x1B8
@ CHECK: RelocationCount: 2
-@ CHECK: Type: 0x0
+@ CHECK: Type: Regular (0x0)
@ CHECK: Attributes [ (0x0)
@ CHECK: ]
@ CHECK: Reserved1: 0x0
@@ -87,7 +87,7 @@ Lsc0_0:
@ CHECK: Alignment: 0
@ CHECK: RelocationOffset: 0x0
@ CHECK: RelocationCount: 0
-@ CHECK: Type: ExtReloc (0x2)
+@ CHECK: Type: CStringLiterals (0x2)
@ CHECK: Attributes [ (0x0)
@ CHECK: ]
@ CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/ARM/darwin-Thumb-reloc.s b/llvm/test/MC/MachO/ARM/darwin-Thumb-reloc.s
index 6bfd8c8661b..8ee19a39e6d 100644
--- a/llvm/test/MC/MachO/ARM/darwin-Thumb-reloc.s
+++ b/llvm/test/MC/MachO/ARM/darwin-Thumb-reloc.s
@@ -48,7 +48,7 @@ L_.str:
@ CHECK: Alignment: 2
@ CHECK: RelocationOffset: 0x160
@ CHECK: RelocationCount: 3
-@ CHECK: Type: 0x0
+@ CHECK: Type: Regular (0x0)
@ CHECK: Attributes [ (0x800004)
@ CHECK: PureInstructions (0x800000)
@ CHECK: SomeInstructions (0x4)
@@ -69,7 +69,7 @@ L_.str:
@ CHECK: Alignment: 2
@ CHECK: RelocationOffset: 0x0
@ CHECK: RelocationCount: 0
-@ CHECK: Type: ExtReloc (0x2)
+@ CHECK: Type: CStringLiterals (0x2)
@ CHECK: Attributes [ (0x0)
@ CHECK: ]
@ CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/ARM/relax-thumb-ldr-literal.s b/llvm/test/MC/MachO/ARM/relax-thumb-ldr-literal.s
index d2d85194d87..2ce65de7aab 100644
--- a/llvm/test/MC/MachO/ARM/relax-thumb-ldr-literal.s
+++ b/llvm/test/MC/MachO/ARM/relax-thumb-ldr-literal.s
@@ -10,7 +10,7 @@ _foo:
ldr r2, (_foo - 4)
@ CHECK: RelocationCount: 0
-@ CHECK: Type: 0x0
+@ CHECK: Type: Regular (0x0)
@ CHECK: Attributes [ (0x800004)
@ CHECK: PureInstructions (0x800000)
@ CHECK: SomeInstructions (0x4)
diff --git a/llvm/test/MC/MachO/absolute.s b/llvm/test/MC/MachO/absolute.s
index fa78fd88e3d..7d560d13712 100644
--- a/llvm/test/MC/MachO/absolute.s
+++ b/llvm/test/MC/MachO/absolute.s
@@ -43,7 +43,7 @@ foo_equals2 = (_foo - _bar + 0xffff0000)
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
diff --git a/llvm/test/MC/MachO/absolutize.s b/llvm/test/MC/MachO/absolutize.s
index 0427d8915fa..1a776d787e3 100644
--- a/llvm/test/MC/MachO/absolutize.s
+++ b/llvm/test/MC/MachO/absolutize.s
@@ -72,7 +72,7 @@ Ldata_expr_2 = Ldata_d - Ldata_c
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x1AC
// CHECK: RelocationCount: 3
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
@@ -95,7 +95,7 @@ Ldata_expr_2 = Ldata_d - Ldata_c
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x1C4
// CHECK: RelocationCount: 3
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/comm-1.s b/llvm/test/MC/MachO/comm-1.s
index 123164c60c9..f7c325c13ab 100644
--- a/llvm/test/MC/MachO/comm-1.s
+++ b/llvm/test/MC/MachO/comm-1.s
@@ -32,7 +32,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
diff --git a/llvm/test/MC/MachO/darwin-complex-difference.s b/llvm/test/MC/MachO/darwin-complex-difference.s
index 388ca199055..ae483eff85c 100644
--- a/llvm/test/MC/MachO/darwin-complex-difference.s
+++ b/llvm/test/MC/MachO/darwin-complex-difference.s
@@ -41,7 +41,7 @@ _d:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x148
// CHECK: RelocationCount: 4
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
diff --git a/llvm/test/MC/MachO/darwin-x86_64-diff-relocs.s b/llvm/test/MC/MachO/darwin-x86_64-diff-relocs.s
index 19d486ca850..3a25999c2b8 100644
--- a/llvm/test/MC/MachO/darwin-x86_64-diff-relocs.s
+++ b/llvm/test/MC/MachO/darwin-x86_64-diff-relocs.s
@@ -149,7 +149,7 @@ L3:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x26C
// CHECK: RelocationCount: 12
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
@@ -176,7 +176,7 @@ L3:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x2CC
// CHECK: RelocationCount: 16
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x4)
// CHECK: SomeInstructions (0x4)
// CHECK: ]
diff --git a/llvm/test/MC/MachO/darwin-x86_64-nobase-relocs.s b/llvm/test/MC/MachO/darwin-x86_64-nobase-relocs.s
index 1559998501f..b974cc673ee 100644
--- a/llvm/test/MC/MachO/darwin-x86_64-nobase-relocs.s
+++ b/llvm/test/MC/MachO/darwin-x86_64-nobase-relocs.s
@@ -41,7 +41,7 @@ Lbar:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
diff --git a/llvm/test/MC/MachO/darwin-x86_64-reloc-offsets.s b/llvm/test/MC/MachO/darwin-x86_64-reloc-offsets.s
index 4be9b2e54e3..fc73ec633c2 100644
--- a/llvm/test/MC/MachO/darwin-x86_64-reloc-offsets.s
+++ b/llvm/test/MC/MachO/darwin-x86_64-reloc-offsets.s
@@ -140,7 +140,7 @@ L1:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x2E8
// CHECK: RelocationCount: 42
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
@@ -181,7 +181,7 @@ L1:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/data.s b/llvm/test/MC/MachO/data.s
index 64ca12133dd..299e55e88e9 100644
--- a/llvm/test/MC/MachO/data.s
+++ b/llvm/test/MC/MachO/data.s
@@ -41,7 +41,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -58,7 +58,7 @@
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/debug_frame.s b/llvm/test/MC/MachO/debug_frame.s
index 7ecc7463bec..b6601f78885 100644
--- a/llvm/test/MC/MachO/debug_frame.s
+++ b/llvm/test/MC/MachO/debug_frame.s
@@ -36,7 +36,7 @@ Ltext_end:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x180
// CHECK: RelocationCount: 2
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x20000)
// CHECK: Debug (0x20000)
// CHECK: ]
diff --git a/llvm/test/MC/MachO/diff-with-two-sections.s b/llvm/test/MC/MachO/diff-with-two-sections.s
index 0637f267791..6302ede13e1 100644
--- a/llvm/test/MC/MachO/diff-with-two-sections.s
+++ b/llvm/test/MC/MachO/diff-with-two-sections.s
@@ -32,7 +32,7 @@ Ltmp4 = Leh_func_begin0-Ltmp3
// CHECK-NEXT: Alignment: 0
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0x0
+// CHECK-NEXT: Type: Regular (0x0)
// CHECK-NEXT: Attributes [ (0x800000)
// CHECK-NEXT: PureInstructions (0x800000)
// CHECK-NEXT: ]
@@ -51,7 +51,7 @@ Ltmp4 = Leh_func_begin0-Ltmp3
// CHECK-NEXT: Alignment: 0
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0xB
+// CHECK-NEXT: Type: Coalesced (0xB)
// CHECK-NEXT: Attributes [ (0x680000)
// CHECK-NEXT: LiveSupport (0x80000)
// CHECK-NEXT: NoTOC (0x400000)
diff --git a/llvm/test/MC/MachO/direction_labels.s b/llvm/test/MC/MachO/direction_labels.s
index 84fc4246c57..0dac4f7377e 100644
--- a/llvm/test/MC/MachO/direction_labels.s
+++ b/llvm/test/MC/MachO/direction_labels.s
@@ -36,7 +36,7 @@ direction_labels:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
diff --git a/llvm/test/MC/MachO/file.s b/llvm/test/MC/MachO/file.s
index 487d8e3c3d9..0076fa56470 100644
--- a/llvm/test/MC/MachO/file.s
+++ b/llvm/test/MC/MachO/file.s
@@ -16,7 +16,7 @@
// CHECK-NEXT: Alignment: 0
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0x0
+// CHECK-NEXT: Type: Regular (0x0)
// CHECK-NEXT: Attributes [ (0x20000)
// CHECK-NEXT: Debug (0x20000)
// CHECK-NEXT: ]
diff --git a/llvm/test/MC/MachO/indirect-symbols.s b/llvm/test/MC/MachO/indirect-symbols.s
index 78d39e829eb..d5221fb2514 100644
--- a/llvm/test/MC/MachO/indirect-symbols.s
+++ b/llvm/test/MC/MachO/indirect-symbols.s
@@ -45,7 +45,7 @@ _e:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -64,7 +64,7 @@ _e:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x8
+// CHECK: Type: SymbolStubs (0x8)
// CHECK: Attributes [ (0x840000)
// CHECK: PureInstructions (0x800000)
// CHECK: SelfModifyingCode (0x40000)
@@ -85,7 +85,7 @@ _e:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x6
+// CHECK: Type: NonLazySymbolPointers (0x6)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x3
diff --git a/llvm/test/MC/MachO/jcc.s b/llvm/test/MC/MachO/jcc.s
index d9941b9c674..9e7936dfec2 100644
--- a/llvm/test/MC/MachO/jcc.s
+++ b/llvm/test/MC/MachO/jcc.s
@@ -90,7 +90,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
diff --git a/llvm/test/MC/MachO/lcomm-attributes.s b/llvm/test/MC/MachO/lcomm-attributes.s
index 21a50b10bfd..c3d2d60764e 100644
--- a/llvm/test/MC/MachO/lcomm-attributes.s
+++ b/llvm/test/MC/MachO/lcomm-attributes.s
@@ -39,7 +39,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -56,7 +56,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: LocReloc (0x1)
+// CHECK: Type: ZeroFill (0x1)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/loc.s b/llvm/test/MC/MachO/loc.s
index c8f61feb11f..143142027ad 100644
--- a/llvm/test/MC/MachO/loc.s
+++ b/llvm/test/MC/MachO/loc.s
@@ -14,7 +14,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x12C
// CHECK: RelocationCount: 1
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x20000)
// CHECK: Debug (0x20000)
// CHECK: ]
diff --git a/llvm/test/MC/MachO/pcrel-to-other-section.s b/llvm/test/MC/MachO/pcrel-to-other-section.s
index c68db8ba931..e4f77c8ce32 100644
--- a/llvm/test/MC/MachO/pcrel-to-other-section.s
+++ b/llvm/test/MC/MachO/pcrel-to-other-section.s
@@ -29,7 +29,7 @@ nop
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
@@ -50,7 +50,7 @@ nop
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x15C
// CHECK: RelocationCount: 1
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
diff --git a/llvm/test/MC/MachO/relax-recompute-align.s b/llvm/test/MC/MachO/relax-recompute-align.s
index 99f8fb95145..30a5d82331a 100644
--- a/llvm/test/MC/MachO/relax-recompute-align.s
+++ b/llvm/test/MC/MachO/relax-recompute-align.s
@@ -32,7 +32,7 @@ L2:
// CHECK-NEXT: Alignment: 4
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0x0
+// CHECK-NEXT: Type: Regular (0x0)
// CHECK-NEXT: Attributes [ (0x800004)
// CHECK-NEXT: PureInstructions (0x800000)
// CHECK-NEXT: SomeInstructions (0x4)
diff --git a/llvm/test/MC/MachO/reloc-pcrel-offset.s b/llvm/test/MC/MachO/reloc-pcrel-offset.s
index 63887bfc9dc..281d785c860 100644
--- a/llvm/test/MC/MachO/reloc-pcrel-offset.s
+++ b/llvm/test/MC/MachO/reloc-pcrel-offset.s
@@ -20,7 +20,7 @@ _b:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/section-align-1.s b/llvm/test/MC/MachO/section-align-1.s
index 6accf57e523..fa697af58b5 100644
--- a/llvm/test/MC/MachO/section-align-1.s
+++ b/llvm/test/MC/MachO/section-align-1.s
@@ -30,7 +30,7 @@ name:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
diff --git a/llvm/test/MC/MachO/section-align-2.s b/llvm/test/MC/MachO/section-align-2.s
index 4d380bc4989..39215e20d57 100644
--- a/llvm/test/MC/MachO/section-align-2.s
+++ b/llvm/test/MC/MachO/section-align-2.s
@@ -39,7 +39,7 @@ baz:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -56,7 +56,7 @@ baz:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -72,7 +72,7 @@ baz:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/section-flags.s b/llvm/test/MC/MachO/section-flags.s
index ca12c50820f..34fb60e9e7f 100644
--- a/llvm/test/MC/MachO/section-flags.s
+++ b/llvm/test/MC/MachO/section-flags.s
@@ -17,7 +17,7 @@ f0:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -36,7 +36,7 @@ f0:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x4)
// CHECK: SomeInstructions (0x4)
// CHECK: ]
diff --git a/llvm/test/MC/MachO/string-table.s b/llvm/test/MC/MachO/string-table.s
index 39e68f71d56..e43ff03d311 100644
--- a/llvm/test/MC/MachO/string-table.s
+++ b/llvm/test/MC/MachO/string-table.s
@@ -27,7 +27,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x11C
// CHECK: RelocationCount: 2
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
diff --git a/llvm/test/MC/MachO/symbol-diff.s b/llvm/test/MC/MachO/symbol-diff.s
index 479bb7b03cd..395e223b583 100644
--- a/llvm/test/MC/MachO/symbol-diff.s
+++ b/llvm/test/MC/MachO/symbol-diff.s
@@ -31,7 +31,7 @@ _g.eh:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -51,7 +51,7 @@ _g.eh:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x188
// CHECK: RelocationCount: 2
-// CHECK: Type: 0xB
+// CHECK: Type: Coalesced (0xB)
// CHECK: Attributes [ (0x680000)
// CHECK: LiveSupport (0x80000)
// CHECK: NoTOC (0x400000)
diff --git a/llvm/test/MC/MachO/symbol-flags.s b/llvm/test/MC/MachO/symbol-flags.s
index c3eb9773f65..991ea5628c4 100644
--- a/llvm/test/MC/MachO/symbol-flags.s
+++ b/llvm/test/MC/MachO/symbol-flags.s
@@ -84,7 +84,7 @@ sym_desc_flags:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -101,7 +101,7 @@ sym_desc_flags:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/symbol-indirect.s b/llvm/test/MC/MachO/symbol-indirect.s
index da09fb130ca..286e29283ab 100644
--- a/llvm/test/MC/MachO/symbol-indirect.s
+++ b/llvm/test/MC/MachO/symbol-indirect.s
@@ -94,7 +94,7 @@ sym_nlp_G:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -111,7 +111,7 @@ sym_nlp_G:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x7
+// CHECK: Type: LazySymbolPointers (0x7)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -127,7 +127,7 @@ sym_nlp_G:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x6
+// CHECK: Type: NonLazySymbolPointers (0x6)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x5
diff --git a/llvm/test/MC/MachO/symbols-1.s b/llvm/test/MC/MachO/symbols-1.s
index cb01de02b16..496ef3d17f6 100644
--- a/llvm/test/MC/MachO/symbols-1.s
+++ b/llvm/test/MC/MachO/symbols-1.s
@@ -42,7 +42,7 @@ Lsym_asm_temp:
// CHECK-X86_32: Alignment: 0
// CHECK-X86_32: RelocationOffset: 0x0
// CHECK-X86_32: RelocationCount: 0
-// CHECK-X86_32: Type: 0x0
+// CHECK-X86_32: Type: Regular (0x0)
// CHECK-X86_32: Attributes [ (0x800000)
// CHECK-X86_32: PureInstructions (0x800000)
// CHECK-X86_32: ]
@@ -206,7 +206,7 @@ Lsym_asm_temp:
// CHECK-X86_64: Alignment: 0
// CHECK-X86_64: RelocationOffset: 0x0
// CHECK-X86_64: RelocationCount: 0
-// CHECK-X86_64: Type: 0x0
+// CHECK-X86_64: Type: Regular (0x0)
// CHECK-X86_64: Attributes [ (0x800000)
// CHECK-X86_64: PureInstructions (0x800000)
// CHECK-X86_64: ]
diff --git a/llvm/test/MC/MachO/tbss.s b/llvm/test/MC/MachO/tbss.s
index ba1f93fed96..37a089f4627 100644
--- a/llvm/test/MC/MachO/tbss.s
+++ b/llvm/test/MC/MachO/tbss.s
@@ -29,7 +29,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -49,7 +49,7 @@
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x12
+// CHECK: Type: ThreadLocalZerofill (0x12)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/tdata.s b/llvm/test/MC/MachO/tdata.s
index 4e2effe4287..e3d35a7443a 100644
--- a/llvm/test/MC/MachO/tdata.s
+++ b/llvm/test/MC/MachO/tdata.s
@@ -29,7 +29,7 @@ _a$tlv$init:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -49,7 +49,7 @@ _a$tlv$init:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x11
+// CHECK: Type: ThreadLocalRegular (0x11)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/thread_init_func.s b/llvm/test/MC/MachO/thread_init_func.s
index c9a5edf6dd4..58d3fac8018 100644
--- a/llvm/test/MC/MachO/thread_init_func.s
+++ b/llvm/test/MC/MachO/thread_init_func.s
@@ -29,7 +29,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -49,7 +49,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x15
+// CHECK: Type: ThreadLocalInitFunctionPointers (0x15)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/tls.s b/llvm/test/MC/MachO/tls.s
index 16f54e7eb25..671184a8406 100644
--- a/llvm/test/MC/MachO/tls.s
+++ b/llvm/test/MC/MachO/tls.s
@@ -72,7 +72,7 @@ _b:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -92,7 +92,7 @@ _b:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x11
+// CHECK: Type: ThreadLocalRegular (0x11)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -112,7 +112,7 @@ _b:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x278
// CHECK: RelocationCount: 8
-// CHECK: Type: 0x13
+// CHECK: Type: ThreadLocalVariables (0x13)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -137,7 +137,7 @@ _b:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x12
+// CHECK: Type: ThreadLocalZerofill (0x12)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/tlv-reloc.s b/llvm/test/MC/MachO/tlv-reloc.s
index b52410198fd..a429fdd2376 100644
--- a/llvm/test/MC/MachO/tlv-reloc.s
+++ b/llvm/test/MC/MachO/tlv-reloc.s
@@ -47,7 +47,7 @@ _foo:
// CHECK: Alignment: 4
// CHECK: RelocationOffset: 0x1E8
// CHECK: RelocationCount: 1
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
@@ -69,7 +69,7 @@ _foo:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x11
+// CHECK: Type: ThreadLocalRegular (0x11)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -89,7 +89,7 @@ _foo:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x1F0
// CHECK: RelocationCount: 2
-// CHECK: Type: 0x13
+// CHECK: Type: ThreadLocalVariables (0x13)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/tlv.s b/llvm/test/MC/MachO/tlv.s
index 1d5c8c3ced9..774436bd319 100644
--- a/llvm/test/MC/MachO/tlv.s
+++ b/llvm/test/MC/MachO/tlv.s
@@ -33,7 +33,7 @@ _a:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -53,7 +53,7 @@ _a:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x13
+// CHECK: Type: ThreadLocalVariables (0x13)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/values.s b/llvm/test/MC/MachO/values.s
index 3218bb7cd9f..5a406acfde0 100644
--- a/llvm/test/MC/MachO/values.s
+++ b/llvm/test/MC/MachO/values.s
@@ -42,7 +42,7 @@ data_def_ext:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -59,7 +59,7 @@ data_def_ext:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/variable-exprs.s b/llvm/test/MC/MachO/variable-exprs.s
index b1830703d8d..c2eb05dceae 100644
--- a/llvm/test/MC/MachO/variable-exprs.s
+++ b/llvm/test/MC/MachO/variable-exprs.s
@@ -71,7 +71,7 @@ Lt0_x = Lt0_a - Lt0_b
// CHECK-I386: Alignment: 0
// CHECK-I386: RelocationOffset: 0x0
// CHECK-I386: RelocationCount: 0
-// CHECK-I386: Type: 0x0
+// CHECK-I386: Type: Regular (0x0)
// CHECK-I386: Attributes [ (0x800004)
// CHECK-I386: PureInstructions (0x800000)
// CHECK-I386: SomeInstructions (0x4)
@@ -92,7 +92,7 @@ Lt0_x = Lt0_a - Lt0_b
// CHECK-I386: Alignment: 0
// CHECK-I386: RelocationOffset: 0x190
// CHECK-I386: RelocationCount: 9
-// CHECK-I386: Type: 0x0
+// CHECK-I386: Type: Regular (0x0)
// CHECK-I386: Attributes [ (0x0)
// CHECK-I386: ]
// CHECK-I386: Reserved1: 0x0
@@ -278,7 +278,7 @@ Lt0_x = Lt0_a - Lt0_b
// CHECK-X86_64: Alignment: 0
// CHECK-X86_64: RelocationOffset: 0x0
// CHECK-X86_64: RelocationCount: 0
-// CHECK-X86_64: Type: 0x0
+// CHECK-X86_64: Type: Regular (0x0)
// CHECK-X86_64: Attributes [ (0x800004)
// CHECK-X86_64: PureInstructions (0x800000)
// CHECK-X86_64: SomeInstructions (0x4)
@@ -300,7 +300,7 @@ Lt0_x = Lt0_a - Lt0_b
// CHECK-X86_64: Alignment: 0
// CHECK-X86_64: RelocationOffset: 0x1BC
// CHECK-X86_64: RelocationCount: 9
-// CHECK-X86_64: Type: 0x0
+// CHECK-X86_64: Type: Regular (0x0)
// CHECK-X86_64: Attributes [ (0x0)
// CHECK-X86_64: ]
// CHECK-X86_64: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/weakdef.s b/llvm/test/MC/MachO/weakdef.s
index 8fd87f4682d..497aad84428 100644
--- a/llvm/test/MC/MachO/weakdef.s
+++ b/llvm/test/MC/MachO/weakdef.s
@@ -39,7 +39,7 @@ __ZTI3optIbE:
// CHECK-NEXT: Alignment: 0
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0x0
+// CHECK-NEXT: Type: Regular (0x0)
// CHECK-NEXT: Attributes [ (0x800000)
// CHECK-NEXT: PureInstructions (0x800000)
// CHECK-NEXT: ]
@@ -58,7 +58,7 @@ __ZTI3optIbE:
// CHECK-NEXT: Alignment: 0
// CHECK-NEXT: RelocationOffset: 0x19C
// CHECK-NEXT: RelocationCount: 1
-// CHECK-NEXT: Type: 0xB
+// CHECK-NEXT: Type: Coalesced (0xB)
// CHECK-NEXT: Attributes [ (0x0)
// CHECK-NEXT: ]
// CHECK-NEXT: Reserved1: 0x0
@@ -77,7 +77,7 @@ __ZTI3optIbE:
// CHECK-NEXT: Alignment: 0
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0xB
+// CHECK-NEXT: Type: Coalesced (0xB)
// CHECK-NEXT: Attributes [ (0x0)
// CHECK-NEXT: ]
// CHECK-NEXT: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/x86_32-optimal_nop.s b/llvm/test/MC/MachO/x86_32-optimal_nop.s
index ac558acadab..23286a50615 100644
--- a/llvm/test/MC/MachO/x86_32-optimal_nop.s
+++ b/llvm/test/MC/MachO/x86_32-optimal_nop.s
@@ -182,7 +182,7 @@ f0:
// CHECK: Alignment: 4
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800004)
// CHECK: PureInstructions (0x800000)
// CHECK: SomeInstructions (0x4)
@@ -224,7 +224,7 @@ f0:
// CHECK: Alignment: 4
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/x86_32-sections.s b/llvm/test/MC/MachO/x86_32-sections.s
index 24c45d0b153..13b8ed3ca94 100644
--- a/llvm/test/MC/MachO/x86_32-sections.s
+++ b/llvm/test/MC/MachO/x86_32-sections.s
@@ -70,7 +70,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -89,7 +89,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -107,7 +107,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -125,7 +125,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: ExtReloc (0x2)
+// CHECK: Type: CStringLiterals (0x2)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -143,7 +143,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x3
+// CHECK: Type: 4ByteLiterals (0x3)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -161,7 +161,7 @@
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: SomeInstructions (0x4)
+// CHECK: Type: 8ByteLiterals (0x4)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -179,7 +179,7 @@
// CHECK: Alignment: 4
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0xE
+// CHECK: Type: 16ByteLiterals (0xE)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -197,7 +197,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -215,7 +215,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -233,7 +233,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x8
+// CHECK: Type: SymbolStubs (0x8)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -252,7 +252,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x8
+// CHECK: Type: SymbolStubs (0x8)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -271,7 +271,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -289,7 +289,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -307,7 +307,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x6
+// CHECK: Type: NonLazySymbolPointers (0x6)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -325,7 +325,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x7
+// CHECK: Type: LazySymbolPointers (0x7)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -343,7 +343,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -361,7 +361,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x9
+// CHECK: Type: ModInitFuncPointers (0x9)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -379,7 +379,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0xA
+// CHECK: Type: ModTermFuncPointers (0xA)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -397,7 +397,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -415,7 +415,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -434,7 +434,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -453,7 +453,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -472,7 +472,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -491,7 +491,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -510,7 +510,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -529,7 +529,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -548,7 +548,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -567,7 +567,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x5
+// CHECK: Type: LiteralPointers (0x5)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -586,7 +586,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x5
+// CHECK: Type: LiteralPointers (0x5)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -605,7 +605,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -624,7 +624,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -643,7 +643,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -662,7 +662,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -681,7 +681,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -700,7 +700,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: ExtReloc (0x2)
+// CHECK: Type: CStringLiterals (0x2)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -718,7 +718,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x8
+// CHECK: Type: SymbolStubs (0x8)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/x86_32-symbols.s b/llvm/test/MC/MachO/x86_32-symbols.s
index d866924434d..35bc90491a0 100644
--- a/llvm/test/MC/MachO/x86_32-symbols.s
+++ b/llvm/test/MC/MachO/x86_32-symbols.s
@@ -146,7 +146,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -165,7 +165,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -183,7 +183,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -201,7 +201,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: ExtReloc (0x2)
+// CHECK: Type: CStringLiterals (0x2)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -219,7 +219,7 @@ D39:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x3
+// CHECK: Type: 4ByteLiterals (0x3)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -237,7 +237,7 @@ D39:
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: SomeInstructions (0x4)
+// CHECK: Type: 8ByteLiterals (0x4)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -255,7 +255,7 @@ D39:
// CHECK: Alignment: 4
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0xE
+// CHECK: Type: 16ByteLiterals (0xE)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -273,7 +273,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -291,7 +291,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -309,7 +309,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x8
+// CHECK: Type: SymbolStubs (0x8)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -328,7 +328,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x8
+// CHECK: Type: SymbolStubs (0x8)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -347,7 +347,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -365,7 +365,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -383,7 +383,7 @@ D39:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x6
+// CHECK: Type: NonLazySymbolPointers (0x6)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -401,7 +401,7 @@ D39:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x7
+// CHECK: Type: LazySymbolPointers (0x7)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -419,7 +419,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -437,7 +437,7 @@ D39:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x9
+// CHECK: Type: ModInitFuncPointers (0x9)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -455,7 +455,7 @@ D39:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0xA
+// CHECK: Type: ModTermFuncPointers (0xA)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -473,7 +473,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -491,7 +491,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -510,7 +510,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -529,7 +529,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -548,7 +548,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -567,7 +567,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -586,7 +586,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -605,7 +605,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -624,7 +624,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -643,7 +643,7 @@ D39:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x5
+// CHECK: Type: LiteralPointers (0x5)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -662,7 +662,7 @@ D39:
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x5
+// CHECK: Type: LiteralPointers (0x5)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -681,7 +681,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -700,7 +700,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -719,7 +719,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -738,7 +738,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -757,7 +757,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -776,7 +776,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: ExtReloc (0x2)
+// CHECK: Type: CStringLiterals (0x2)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -794,7 +794,7 @@ D39:
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x8
+// CHECK: Type: SymbolStubs (0x8)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/x86_64-sections.s b/llvm/test/MC/MachO/x86_64-sections.s
index 262b5c40b5e..450ba3cd887 100644
--- a/llvm/test/MC/MachO/x86_64-sections.s
+++ b/llvm/test/MC/MachO/x86_64-sections.s
@@ -66,7 +66,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -86,7 +86,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -105,7 +105,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -124,7 +124,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: ExtReloc (0x2)
+// CHECK: Type: CStringLiterals (0x2)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -143,7 +143,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x3
+// CHECK: Type: 4ByteLiterals (0x3)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -162,7 +162,7 @@
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: SomeInstructions (0x4)
+// CHECK: Type: 8ByteLiterals (0x4)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -181,7 +181,7 @@
// CHECK: Alignment: 4
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0xE
+// CHECK: Type: 16ByteLiterals (0xE)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -200,7 +200,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -219,7 +219,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -238,7 +238,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -257,7 +257,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -276,7 +276,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -295,7 +295,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x9
+// CHECK: Type: ModInitFuncPointers (0x9)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -314,7 +314,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0xA
+// CHECK: Type: ModTermFuncPointers (0xA)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -333,7 +333,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -352,7 +352,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -372,7 +372,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -392,7 +392,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -412,7 +412,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -432,7 +432,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -452,7 +452,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -472,7 +472,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -492,7 +492,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -512,7 +512,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x5
+// CHECK: Type: LiteralPointers (0x5)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -532,7 +532,7 @@
// CHECK: Alignment: 2
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x5
+// CHECK: Type: LiteralPointers (0x5)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -552,7 +552,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -572,7 +572,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -592,7 +592,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -612,7 +612,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -632,7 +632,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x100000)
// CHECK: NoDeadStrip (0x100000)
// CHECK: ]
@@ -652,7 +652,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: ExtReloc (0x2)
+// CHECK: Type: CStringLiterals (0x2)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/zero-space.s b/llvm/test/MC/MachO/zero-space.s
index f6f115222a5..e809aa70f7f 100644
--- a/llvm/test/MC/MachO/zero-space.s
+++ b/llvm/test/MC/MachO/zero-space.s
@@ -32,7 +32,7 @@
// CHECK-NEXT: Alignment: 0
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0x0
+// CHECK-NEXT: Type: Regular (0x0)
// CHECK-NEXT: Attributes [ (0x800000)
// CHECK-NEXT: PureInstructions (0x800000)
// CHECK-NEXT: ]
@@ -52,7 +52,7 @@
// CHECK-NEXT: Alignment: 6
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
-// CHECK-NEXT: Type: 0x0
+// CHECK-NEXT: Type: Regular (0x0)
// CHECK-NEXT: Attributes [ (0x0)
// CHECK-NEXT: ]
// CHECK-NEXT: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/zerofill-1.s b/llvm/test/MC/MachO/zerofill-1.s
index b03b1458680..5ca6b24ee1e 100644
--- a/llvm/test/MC/MachO/zerofill-1.s
+++ b/llvm/test/MC/MachO/zerofill-1.s
@@ -33,7 +33,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -53,7 +53,7 @@
// CHECK: Alignment: 1
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: LocReloc (0x1)
+// CHECK: Type: ZeroFill (0x1)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
@@ -69,7 +69,7 @@
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/zerofill-2.s b/llvm/test/MC/MachO/zerofill-2.s
index f5848502416..97bde10fa43 100644
--- a/llvm/test/MC/MachO/zerofill-2.s
+++ b/llvm/test/MC/MachO/zerofill-2.s
@@ -30,7 +30,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -50,7 +50,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: LocReloc (0x1)
+// CHECK: Type: ZeroFill (0x1)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/zerofill-3.s b/llvm/test/MC/MachO/zerofill-3.s
index c5baa752f85..c8fb80f5290 100644
--- a/llvm/test/MC/MachO/zerofill-3.s
+++ b/llvm/test/MC/MachO/zerofill-3.s
@@ -44,7 +44,7 @@
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -63,7 +63,7 @@
// CHECK: Alignment: 4
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: LocReloc (0x1)
+// CHECK: Type: ZeroFill (0x1)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/MachO/zerofill-5.s b/llvm/test/MC/MachO/zerofill-5.s
index c3152366c7d..2eb494a038b 100644
--- a/llvm/test/MC/MachO/zerofill-5.s
+++ b/llvm/test/MC/MachO/zerofill-5.s
@@ -32,7 +32,7 @@
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0x0
+// CHECK: Type: Regular (0x0)
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
@@ -53,7 +53,7 @@
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: LocReloc (0x1)
+// CHECK: Type: ZeroFill (0x1)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
diff --git a/llvm/test/MC/X86/cfi_def_cfa-crash.s b/llvm/test/MC/X86/cfi_def_cfa-crash.s
index 61a03e1e4c5..b67db658dd5 100644
--- a/llvm/test/MC/X86/cfi_def_cfa-crash.s
+++ b/llvm/test/MC/X86/cfi_def_cfa-crash.s
@@ -78,7 +78,7 @@ _foo:
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
-// CHECK: Type: 0xB
+// CHECK: Type: Coalesced (0xB)
// CHECK: Attributes [ (0x680000)
// CHECK: LiveSupport (0x80000)
// CHECK: NoTOC (0x400000)
diff --git a/llvm/test/tools/dsymutil/X86/dsym-companion.test b/llvm/test/tools/dsymutil/X86/dsym-companion.test
index fa9df3950a2..6b567952a19 100644
--- a/llvm/test/tools/dsymutil/X86/dsym-companion.test
+++ b/llvm/test/tools/dsymutil/X86/dsym-companion.test
@@ -39,7 +39,7 @@ CHECK: Offset: 0
CHECK: Alignment: 4
CHECK: RelocationOffset: 0x0
CHECK: RelocationCount: 0
-CHECK: Type: 0x0
+CHECK: Type: Regular (0x0)
CHECK: Attributes [ (0x800004)
CHECK: PureInstructions (0x800000)
CHECK: SomeInstructions (0x4)
@@ -57,7 +57,7 @@ CHECK: Offset: 0
CHECK: Alignment: 2
CHECK: RelocationOffset: 0x0
CHECK: RelocationCount: 0
-CHECK: Type: 0x0
+CHECK: Type: Regular (0x0)
CHECK: Attributes [ (0x0)
CHECK: ]
CHECK: Reserved1: 0x0
@@ -72,7 +72,7 @@ CHECK32: Offset: 0
CHECK32: Alignment: 2
CHECK32: RelocationOffset: 0x0
CHECK32: RelocationCount: 0
-CHECK32: Type: 0x6
+CHECK32: Type: NonLazySymbolPointers (0x6)
CHECK32: Attributes [ (0x0)
CHECK32: ]
CHECK32: Reserved1: 0x0
@@ -88,7 +88,7 @@ CHECK: Offset: 0
CHECK: Alignment: 2
CHECK: RelocationOffset: 0x0
CHECK: RelocationCount: 0
-CHECK: Type: 0x0
+CHECK: Type: Regular (0x0)
CHECK: Attributes [ (0x0)
CHECK: ]
CHECK: Reserved1: 0x0
@@ -104,7 +104,7 @@ CHECK: Offset: 0
CHECK: Alignment: 2
CHECK: RelocationOffset: 0x0
CHECK: RelocationCount: 0
-CHECK: Type: LocReloc (0x1)
+CHECK: Type: ZeroFill (0x1)
CHECK: Attributes [ (0x0)
CHECK: ]
CHECK: Reserved1: 0x0
@@ -120,7 +120,7 @@ CHECK: Offset: 0
CHECK: Alignment: 2
CHECK: RelocationOffset: 0x0
CHECK: RelocationCount: 0
-CHECK: Type: LocReloc (0x1)
+CHECK: Type: ZeroFill (0x1)
CHECK: Attributes [ (0x0)
CHECK: ]
CHECK: Reserved1: 0x0
@@ -135,7 +135,7 @@ CHECK64: Offset: 8192
CHECK64: Alignment: 0
CHECK64: RelocationOffset: 0x0
CHECK64: RelocationCount: 0
-CHECK64: Type: 0x0
+CHECK64: Type: Regular (0x0)
CHECK64: Attributes [ (0x0)
CHECK64: ]
CHECK64: Reserved1: 0x0
@@ -150,7 +150,7 @@ CHECK64: Offset: 8426
CHECK64: Alignment: 0
CHECK64: RelocationOffset: 0x0
CHECK64: RelocationCount: 0
-CHECK64: Type: 0x0
+CHECK64: Type: Regular (0x0)
CHECK64: Attributes [ (0x0)
CHECK64: ]
CHECK64: Reserved1: 0x0
@@ -165,7 +165,7 @@ CHECK64: Offset: 8553
CHECK64: Alignment: 0
CHECK64: RelocationOffset: 0x0
CHECK64: RelocationCount: 0
-CHECK64: Type: 0x0
+CHECK64: Type: Regular (0x0)
CHECK64: Attributes [ (0x0)
CHECK64: ]
CHECK64: Reserved1: 0x0
@@ -180,7 +180,7 @@ CHECK64: Offset: 8640
CHECK64: Alignment: 0
CHECK64: RelocationOffset: 0x0
CHECK64: RelocationCount: 0
-CHECK64: Type: 0x0
+CHECK64: Type: Regular (0x0)
CHECK64: Attributes [ (0x0)
CHECK64: ]
CHECK64: Reserved1: 0x0
@@ -195,7 +195,7 @@ CHECK64: Offset: 8816
CHECK64: Alignment: 0
CHECK64: RelocationOffset: 0x0
CHECK64: RelocationCount: 0
-CHECK64: Type: 0x0
+CHECK64: Type: Regular (0x0)
CHECK64: Attributes [ (0x0)
CHECK64: ]
CHECK64: Reserved1: 0x0
@@ -213,7 +213,7 @@ CHECK64: Offset: 9260
CHECK: Alignment: 0
CHECK: RelocationOffset: 0x0
CHECK: RelocationCount: 0
-CHECK: Type: 0x0
+CHECK: Type: Regular (0x0)
CHECK: Attributes [ (0x0)
CHECK: ]
CHECK: Reserved1: 0x0
@@ -231,7 +231,7 @@ CHECK64: Offset: 9403
CHECK: Alignment: 0
CHECK: RelocationOffset: 0x0
CHECK: RelocationCount: 0
-CHECK: Type: 0x0
+CHECK: Type: Regular (0x0)
CHECK: Attributes [ (0x0)
CHECK: ]
CHECK: Reserved1: 0x0
diff --git a/llvm/test/tools/llvm-readobj/macho-sections.test b/llvm/test/tools/llvm-readobj/macho-sections.test
new file mode 100644
index 00000000000..37c6567164b
--- /dev/null
+++ b/llvm/test/tools/llvm-readobj/macho-sections.test
@@ -0,0 +1,314 @@
+## Show that llvm-readobj prints MachO all section types properly.
+# RUN: yaml2obj %s > %t
+# RUN: llvm-readobj --sections %t | FileCheck %s
+
+# CHECK: Type: Regular (0x0)
+# CHECK: Type: ZeroFill (0x1)
+# CHECK: Type: CStringLiterals (0x2)
+# CHECK: Type: 4ByteLiterals (0x3)
+# CHECK: Type: 8ByteLiterals (0x4)
+# CHECK: Type: LiteralPointers (0x5)
+# CHECK: Type: NonLazySymbolPointers (0x6)
+# CHECK: Type: LazySymbolPointers (0x7)
+# CHECK: Type: SymbolStubs (0x8)
+# CHECK: Type: ModInitFuncPointers (0x9)
+# CHECK: Type: ModTermFuncPointers (0xA)
+# CHECK: Type: Coalesced (0xB)
+# CHECK: Type: GBZeroFill (0xC)
+# CHECK: Type: Interposing (0xD)
+# CHECK: Type: 16ByteLiterals (0xE)
+# CHECK: Type: DTraceDOF (0xF)
+# CHECK: Type: LazyDylibSymbolPointers (0x10)
+# CHECK: Type: ThreadLocalRegular (0x11)
+# CHECK: Type: ThreadLocalZerofill (0x12)
+# CHECK: Type: ThreadLocalVariables (0x13)
+# CHECK: Type: ThreadLocalVariablePointers (0x14)
+# CHECK: Type: ThreadLocalInitFunctionPointers (0x15)
+
+--- !mach-o
+FileHeader:
+ magic: 0xFEEDFACF
+ cputype: 0x01000007
+ cpusubtype: 0x80000003
+ filetype: 0x00000002
+ ncmds: 1
+ sizeofcmds: 1832
+ flags: 0x00002000
+ reserved: 0x00000000
+LoadCommands:
+ - cmd: LC_SEGMENT_64
+ cmdsize: 1832
+ segname: ''
+ vmaddr: 0x0000000000001000
+ vmsize: 4096
+ fileoff: 0
+ filesize: 4096
+ maxprot: 7
+ initprot: 7
+ nsects: 22
+ flags: 0
+ Sections:
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000000
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000001
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000002
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000003
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000004
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000005
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000006
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000007
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000008
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000009
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x0000000a
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x0000000b
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x0000000c
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x0000000d
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x0000000e
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x0000000f
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000010
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000011
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000012
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000013
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000014
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ - sectname: ''
+ segname: ''
+ addr: 0x000000000000000
+ size: 0
+ offset: 0x00000000
+ align: 0
+ reloff: 0x00000000
+ nreloc: 0
+ flags: 0x00000015
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
diff --git a/llvm/test/tools/llvm-readobj/macho-universal-x86_64.i386.test b/llvm/test/tools/llvm-readobj/macho-universal-x86_64.i386.test
index dc03ab367b1..d91a43bd7a8 100644
--- a/llvm/test/tools/llvm-readobj/macho-universal-x86_64.i386.test
+++ b/llvm/test/tools/llvm-readobj/macho-universal-x86_64.i386.test
@@ -66,7 +66,7 @@ MULTISECTIONS: Offset: 3936
MULTISECTIONS: Alignment: 4
MULTISECTIONS: RelocationOffset: 0x0
MULTISECTIONS: RelocationCount: 0
-MULTISECTIONS: Type: 0x0
+MULTISECTIONS: Type: Regular (0x0)
MULTISECTIONS: Attributes [ (0x800004)
MULTISECTIONS: PureInstructions (0x800000)
MULTISECTIONS: SomeInstructions (0x4)
@@ -84,7 +84,7 @@ MULTISECTIONS: Offset: 3954
MULTISECTIONS: Alignment: 0
MULTISECTIONS: RelocationOffset: 0x0
MULTISECTIONS: RelocationCount: 0
-MULTISECTIONS: Type: 0x0
+MULTISECTIONS: Type: Regular (0x0)
MULTISECTIONS: Attributes [ (0x0)
MULTISECTIONS: ]
MULTISECTIONS: Reserved1: 0x0
@@ -100,7 +100,7 @@ MULTISECTIONS: Offset: 4032
MULTISECTIONS: Alignment: 3
MULTISECTIONS: RelocationOffset: 0x0
MULTISECTIONS: RelocationCount: 0
-MULTISECTIONS: Type: 0x0
+MULTISECTIONS: Type: Regular (0x0)
MULTISECTIONS: Attributes [ (0x0)
MULTISECTIONS: ]
MULTISECTIONS: Reserved1: 0x0
@@ -122,7 +122,7 @@ MULTISECTIONS: Offset: 4000
MULTISECTIONS: Alignment: 4
MULTISECTIONS: RelocationOffset: 0x0
MULTISECTIONS: RelocationCount: 0
-MULTISECTIONS: Type: 0x0
+MULTISECTIONS: Type: Regular (0x0)
MULTISECTIONS: Attributes [ (0x800004)
MULTISECTIONS: PureInstructions (0x800000)
MULTISECTIONS: SomeInstructions (0x4)
@@ -140,7 +140,7 @@ MULTISECTIONS: Offset: 4021
MULTISECTIONS: Alignment: 0
MULTISECTIONS: RelocationOffset: 0x0
MULTISECTIONS: RelocationCount: 0
-MULTISECTIONS: Type: 0x0
+MULTISECTIONS: Type: Regular (0x0)
MULTISECTIONS: Attributes [ (0x0)
MULTISECTIONS: ]
MULTISECTIONS: Reserved1: 0x0
@@ -198,7 +198,7 @@ MULTISECTIONS-ARCHIVE: Offset: 528
MULTISECTIONS-ARCHIVE: Alignment: 4
MULTISECTIONS-ARCHIVE: RelocationOffset: 0x2B8
MULTISECTIONS-ARCHIVE: RelocationCount: 2
-MULTISECTIONS-ARCHIVE: Type: 0x0
+MULTISECTIONS-ARCHIVE: Type: Regular (0x0)
MULTISECTIONS-ARCHIVE: Attributes [ (0x800004)
MULTISECTIONS-ARCHIVE: PureInstructions (0x800000)
MULTISECTIONS-ARCHIVE: SomeInstructions (0x4)
@@ -216,7 +216,7 @@ MULTISECTIONS-ARCHIVE: Offset: 587
MULTISECTIONS-ARCHIVE: Alignment: 0
MULTISECTIONS-ARCHIVE: RelocationOffset: 0x0
MULTISECTIONS-ARCHIVE: RelocationCount: 0
-MULTISECTIONS-ARCHIVE: Type: ExtReloc (0x2)
+MULTISECTIONS-ARCHIVE: Type: CStringLiterals (0x2)
MULTISECTIONS-ARCHIVE: Attributes [ (0x0)
MULTISECTIONS-ARCHIVE: ]
MULTISECTIONS-ARCHIVE: Reserved1: 0x0
@@ -232,7 +232,7 @@ MULTISECTIONS-ARCHIVE: Offset: 600
MULTISECTIONS-ARCHIVE: Alignment: 3
MULTISECTIONS-ARCHIVE: RelocationOffset: 0x2C8
MULTISECTIONS-ARCHIVE: RelocationCount: 1
-MULTISECTIONS-ARCHIVE: Type: 0x0
+MULTISECTIONS-ARCHIVE: Type: Regular (0x0)
MULTISECTIONS-ARCHIVE: Attributes [ (0x20000)
MULTISECTIONS-ARCHIVE: Debug (0x20000)
MULTISECTIONS-ARCHIVE: ]
@@ -249,7 +249,7 @@ MULTISECTIONS-ARCHIVE: Offset: 632
MULTISECTIONS-ARCHIVE: Alignment: 3
MULTISECTIONS-ARCHIVE: RelocationOffset: 0x0
MULTISECTIONS-ARCHIVE: RelocationCount: 0
-MULTISECTIONS-ARCHIVE: Type: 0xB
+MULTISECTIONS-ARCHIVE: Type: Coalesced (0xB)
MULTISECTIONS-ARCHIVE: Attributes [ (0x680000)
MULTISECTIONS-ARCHIVE: LiveSupport (0x80000)
MULTISECTIONS-ARCHIVE: NoTOC (0x400000)
@@ -275,7 +275,7 @@ MULTISECTIONS-ARCHIVE: Offset: 324
MULTISECTIONS-ARCHIVE: Alignment: 4
MULTISECTIONS-ARCHIVE: RelocationOffset: 0x0
MULTISECTIONS-ARCHIVE: RelocationCount: 0
-MULTISECTIONS-ARCHIVE: Type: 0x0
+MULTISECTIONS-ARCHIVE: Type: Regular (0x0)
MULTISECTIONS-ARCHIVE: Attributes [ (0x800004)
MULTISECTIONS-ARCHIVE: PureInstructions (0x800000)
MULTISECTIONS-ARCHIVE: SomeInstructions (0x4)
@@ -293,7 +293,7 @@ MULTISECTIONS-ARCHIVE: Offset: 332
MULTISECTIONS-ARCHIVE: Alignment: 2
MULTISECTIONS-ARCHIVE: RelocationOffset: 0x0
MULTISECTIONS-ARCHIVE: RelocationCount: 0
-MULTISECTIONS-ARCHIVE: Type: 0x0
+MULTISECTIONS-ARCHIVE: Type: Regular (0x0)
MULTISECTIONS-ARCHIVE: Attributes [ (0x0)
MULTISECTIONS-ARCHIVE: ]
MULTISECTIONS-ARCHIVE: Reserved1: 0x0
diff --git a/llvm/test/tools/llvm-readobj/sections-ext.test b/llvm/test/tools/llvm-readobj/sections-ext.test
index 2691c221112..f64294c2ed3 100644
--- a/llvm/test/tools/llvm-readobj/sections-ext.test
+++ b/llvm/test/tools/llvm-readobj/sections-ext.test
@@ -186,7 +186,7 @@ MACHO-I386-NEXT: Offset: 324
MACHO-I386-NEXT: Alignment: 4
MACHO-I386-NEXT: RelocationOffset: 0x174
MACHO-I386-NEXT: RelocationCount: 4
-MACHO-I386-NEXT: Type: 0x0
+MACHO-I386-NEXT: Type: Regular (0x0)
MACHO-I386-NEXT: Attributes [ (0x800004)
MACHO-I386-NEXT: PureInstructions (0x800000)
MACHO-I386-NEXT: SomeInstructions (0x4)
@@ -230,7 +230,7 @@ MACHO-X86-64-NEXT: Offset: 368
MACHO-X86-64-NEXT: Alignment: 4
MACHO-X86-64-NEXT: RelocationOffset: 0x194
MACHO-X86-64-NEXT: RelocationCount: 3
-MACHO-X86-64-NEXT: Type: 0x0
+MACHO-X86-64-NEXT: Type: Regular (0x0)
MACHO-X86-64-NEXT: Attributes [ (0x800004)
MACHO-X86-64-NEXT: PureInstructions (0x800000)
MACHO-X86-64-NEXT: SomeInstructions (0x4)
@@ -270,7 +270,7 @@ MACHO-X86-64-NEXT: Offset: 390
MACHO-X86-64-NEXT: Alignment: 0
MACHO-X86-64-NEXT: RelocationOffset: 0x0
MACHO-X86-64-NEXT: RelocationCount: 0
-MACHO-X86-64-NEXT: Type: ExtReloc (0x2)
+MACHO-X86-64-NEXT: Type: CStringLiterals (0x2)
MACHO-X86-64-NEXT: Attributes [ (0x0)
MACHO-X86-64-NEXT: ]
MACHO-X86-64-NEXT: Reserved1: 0x0
@@ -306,7 +306,7 @@ MACHO-PPC-NEXT: Offset: 528
MACHO-PPC-NEXT: Alignment: 2
MACHO-PPC-NEXT: RelocationOffset: 0x27C
MACHO-PPC-NEXT: RelocationCount: 5
-MACHO-PPC-NEXT: Type: 0x0
+MACHO-PPC-NEXT: Type: Regular (0x0)
MACHO-PPC-NEXT: Attributes [ (0x800004)
MACHO-PPC-NEXT: PureInstructions (0x800000)
MACHO-PPC-NEXT: SomeInstructions (0x4)
@@ -379,7 +379,7 @@ MACHO-PPC-NEXT: Offset: 592
MACHO-PPC-NEXT: Alignment: 5
MACHO-PPC-NEXT: RelocationOffset: 0x2A4
MACHO-PPC-NEXT: RelocationCount: 4
-MACHO-PPC-NEXT: Type: 0x8
+MACHO-PPC-NEXT: Type: SymbolStubs (0x8)
MACHO-PPC-NEXT: Attributes [ (0x800004)
MACHO-PPC-NEXT: PureInstructions (0x800000)
MACHO-PPC-NEXT: SomeInstructions (0x4)
@@ -433,7 +433,7 @@ MACHO-PPC-NEXT: Offset: 624
MACHO-PPC-NEXT: Alignment: 2
MACHO-PPC-NEXT: RelocationOffset: 0x0
MACHO-PPC-NEXT: RelocationCount: 0
-MACHO-PPC-NEXT: Type: 0x0
+MACHO-PPC-NEXT: Type: Regular (0x0)
MACHO-PPC-NEXT: Attributes [ (0x0)
MACHO-PPC-NEXT: ]
MACHO-PPC-NEXT: Reserved1: 0x0
@@ -466,7 +466,7 @@ MACHO-PPC-NEXT: Offset: 628
MACHO-PPC-NEXT: Alignment: 2
MACHO-PPC-NEXT: RelocationOffset: 0x0
MACHO-PPC-NEXT: RelocationCount: 0
-MACHO-PPC-NEXT: Type: 0x6
+MACHO-PPC-NEXT: Type: NonLazySymbolPointers (0x6)
MACHO-PPC-NEXT: Attributes [ (0x0)
MACHO-PPC-NEXT: ]
MACHO-PPC-NEXT: Reserved1: 0x1
@@ -489,7 +489,7 @@ MACHO-PPC-NEXT: Offset: 632
MACHO-PPC-NEXT: Alignment: 2
MACHO-PPC-NEXT: RelocationOffset: 0x2C4
MACHO-PPC-NEXT: RelocationCount: 1
-MACHO-PPC-NEXT: Type: 0x7
+MACHO-PPC-NEXT: Type: LazySymbolPointers (0x7)
MACHO-PPC-NEXT: Attributes [ (0x0)
MACHO-PPC-NEXT: ]
MACHO-PPC-NEXT: Reserved1: 0x2
@@ -523,7 +523,7 @@ MACHO-PPC64-NEXT: Offset: 608
MACHO-PPC64-NEXT: Alignment: 2
MACHO-PPC64-NEXT: RelocationOffset: 0x2D4
MACHO-PPC64-NEXT: RelocationCount: 5
-MACHO-PPC64-NEXT: Type: 0x0
+MACHO-PPC64-NEXT: Type: Regular (0x0)
MACHO-PPC64-NEXT: Attributes [ (0x800004)
MACHO-PPC64-NEXT: PureInstructions (0x800000)
MACHO-PPC64-NEXT: SomeInstructions (0x4)
@@ -597,7 +597,7 @@ MACHO-PPC64-NEXT: Offset: 672
MACHO-PPC64-NEXT: Alignment: 5
MACHO-PPC64-NEXT: RelocationOffset: 0x2FC
MACHO-PPC64-NEXT: RelocationCount: 4
-MACHO-PPC64-NEXT: Type: 0x8
+MACHO-PPC64-NEXT: Type: SymbolStubs (0x8)
MACHO-PPC64-NEXT: Attributes [ (0x800004)
MACHO-PPC64-NEXT: PureInstructions (0x800000)
MACHO-PPC64-NEXT: SomeInstructions (0x4)
@@ -652,7 +652,7 @@ MACHO-PPC64-NEXT: Offset: 704
MACHO-PPC64-NEXT: Alignment: 2
MACHO-PPC64-NEXT: RelocationOffset: 0x0
MACHO-PPC64-NEXT: RelocationCount: 0
-MACHO-PPC64-NEXT: Type: 0x0
+MACHO-PPC64-NEXT: Type: Regular (0x0)
MACHO-PPC64-NEXT: Attributes [ (0x0)
MACHO-PPC64-NEXT: ]
MACHO-PPC64-NEXT: Reserved1: 0x0
@@ -686,7 +686,7 @@ MACHO-PPC64-NEXT: Offset: 708
MACHO-PPC64-NEXT: Alignment: 2
MACHO-PPC64-NEXT: RelocationOffset: 0x0
MACHO-PPC64-NEXT: RelocationCount: 0
-MACHO-PPC64-NEXT: Type: 0x6
+MACHO-PPC64-NEXT: Type: NonLazySymbolPointers (0x6)
MACHO-PPC64-NEXT: Attributes [ (0x0)
MACHO-PPC64-NEXT: ]
MACHO-PPC64-NEXT: Reserved1: 0x1
@@ -710,7 +710,7 @@ MACHO-PPC64-NEXT: Offset: 716
MACHO-PPC64-NEXT: Alignment: 2
MACHO-PPC64-NEXT: RelocationOffset: 0x31C
MACHO-PPC64-NEXT: RelocationCount: 1
-MACHO-PPC64-NEXT: Type: 0x7
+MACHO-PPC64-NEXT: Type: LazySymbolPointers (0x7)
MACHO-PPC64-NEXT: Attributes [ (0x0)
MACHO-PPC64-NEXT: ]
MACHO-PPC64-NEXT: Reserved1: 0x2
@@ -744,7 +744,7 @@ MACHO-ARM-NEXT: Offset: 664
MACHO-ARM-NEXT: Alignment: 2
MACHO-ARM-NEXT: RelocationOffset: 0x2E0
MACHO-ARM-NEXT: RelocationCount: 9
-MACHO-ARM-NEXT: Type: 0x0
+MACHO-ARM-NEXT: Type: Regular (0x0)
MACHO-ARM-NEXT: Attributes [ (0x800004)
MACHO-ARM-NEXT: PureInstructions (0x800000)
MACHO-ARM-NEXT: SomeInstructions (0x4)
@@ -855,7 +855,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 0
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0xB
+MACHO-ARM-NEXT: Type: Coalesced (0xB)
MACHO-ARM-NEXT: Attributes [ (0x800000)
MACHO-ARM-NEXT: PureInstructions (0x800000)
MACHO-ARM-NEXT: ]
@@ -878,7 +878,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 0
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0xB
+MACHO-ARM-NEXT: Type: Coalesced (0xB)
MACHO-ARM-NEXT: Attributes [ (0x0)
MACHO-ARM-NEXT: ]
MACHO-ARM-NEXT: Reserved1: 0x0
@@ -900,7 +900,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 0
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0x8
+MACHO-ARM-NEXT: Type: SymbolStubs (0x8)
MACHO-ARM-NEXT: Attributes [ (0x0)
MACHO-ARM-NEXT: ]
MACHO-ARM-NEXT: Reserved1: 0x0
@@ -922,7 +922,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 0
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0x0
+MACHO-ARM-NEXT: Type: Regular (0x0)
MACHO-ARM-NEXT: Attributes [ (0x800000)
MACHO-ARM-NEXT: PureInstructions (0x800000)
MACHO-ARM-NEXT: ]
@@ -945,7 +945,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 2
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0x0
+MACHO-ARM-NEXT: Type: Regular (0x0)
MACHO-ARM-NEXT: Attributes [ (0x0)
MACHO-ARM-NEXT: ]
MACHO-ARM-NEXT: Reserved1: 0x0
@@ -978,7 +978,7 @@ MACHO-ARM-NEXT: Offset: 728
MACHO-ARM-NEXT: Alignment: 2
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0x6
+MACHO-ARM-NEXT: Type: NonLazySymbolPointers (0x6)
MACHO-ARM-NEXT: Attributes [ (0x0)
MACHO-ARM-NEXT: ]
MACHO-ARM-NEXT: Reserved1: 0x0
diff --git a/llvm/test/tools/llvm-readobj/sections.test b/llvm/test/tools/llvm-readobj/sections.test
index 5eab22be1a3..1ad4e98b2de 100644
--- a/llvm/test/tools/llvm-readobj/sections.test
+++ b/llvm/test/tools/llvm-readobj/sections.test
@@ -137,7 +137,7 @@ MACHO-I386-NEXT: Offset: 324
MACHO-I386-NEXT: Alignment: 4
MACHO-I386-NEXT: RelocationOffset: 0x174
MACHO-I386-NEXT: RelocationCount: 4
-MACHO-I386-NEXT: Type: 0x0
+MACHO-I386-NEXT: Type: Regular (0x0)
MACHO-I386-NEXT: Attributes [ (0x800004)
MACHO-I386-NEXT: PureInstructions (0x800000)
MACHO-I386-NEXT: SomeInstructions (0x4)
@@ -155,7 +155,7 @@ MACHO-I386-NEXT: Offset: 358
MACHO-I386-NEXT: Alignment: 0
MACHO-I386-NEXT: RelocationOffset: 0x0
MACHO-I386-NEXT: RelocationCount: 0
-MACHO-I386-NEXT: Type: ExtReloc (0x2)
+MACHO-I386-NEXT: Type: CStringLiterals (0x2)
MACHO-I386-NEXT: Attributes [ (0x0)
MACHO-I386-NEXT: ]
MACHO-I386-NEXT: Reserved1: 0x0
@@ -174,7 +174,7 @@ MACHO-X86-64-NEXT: Offset: 368
MACHO-X86-64-NEXT: Alignment: 4
MACHO-X86-64-NEXT: RelocationOffset: 0x194
MACHO-X86-64-NEXT: RelocationCount: 3
-MACHO-X86-64-NEXT: Type: 0x0
+MACHO-X86-64-NEXT: Type: Regular (0x0)
MACHO-X86-64-NEXT: Attributes [ (0x800004)
MACHO-X86-64-NEXT: PureInstructions (0x800000)
MACHO-X86-64-NEXT: SomeInstructions (0x4)
@@ -193,7 +193,7 @@ MACHO-X86-64-NEXT: Offset: 390
MACHO-X86-64-NEXT: Alignment: 0
MACHO-X86-64-NEXT: RelocationOffset: 0x0
MACHO-X86-64-NEXT: RelocationCount: 0
-MACHO-X86-64-NEXT: Type: ExtReloc (0x2)
+MACHO-X86-64-NEXT: Type: CStringLiterals (0x2)
MACHO-X86-64-NEXT: Attributes [ (0x0)
MACHO-X86-64-NEXT: ]
MACHO-X86-64-NEXT: Reserved1: 0x0
@@ -213,7 +213,7 @@ MACHO-PPC-NEXT: Offset: 528
MACHO-PPC-NEXT: Alignment: 2
MACHO-PPC-NEXT: RelocationOffset: 0x27C
MACHO-PPC-NEXT: RelocationCount: 5
-MACHO-PPC-NEXT: Type: 0x0
+MACHO-PPC-NEXT: Type: Regular (0x0)
MACHO-PPC-NEXT: Attributes [ (0x800004)
MACHO-PPC-NEXT: PureInstructions (0x800000)
MACHO-PPC-NEXT: SomeInstructions (0x4)
@@ -231,7 +231,7 @@ MACHO-PPC-NEXT: Offset: 592
MACHO-PPC-NEXT: Alignment: 5
MACHO-PPC-NEXT: RelocationOffset: 0x2A4
MACHO-PPC-NEXT: RelocationCount: 4
-MACHO-PPC-NEXT: Type: 0x8
+MACHO-PPC-NEXT: Type: SymbolStubs (0x8)
MACHO-PPC-NEXT: Attributes [ (0x800004)
MACHO-PPC-NEXT: PureInstructions (0x800000)
MACHO-PPC-NEXT: SomeInstructions (0x4)
@@ -249,7 +249,7 @@ MACHO-PPC-NEXT: Offset: 624
MACHO-PPC-NEXT: Alignment: 2
MACHO-PPC-NEXT: RelocationOffset: 0x0
MACHO-PPC-NEXT: RelocationCount: 0
-MACHO-PPC-NEXT: Type: 0x0
+MACHO-PPC-NEXT: Type: Regular (0x0)
MACHO-PPC-NEXT: Attributes [ (0x0)
MACHO-PPC-NEXT: ]
MACHO-PPC-NEXT: Reserved1: 0x0
@@ -265,7 +265,7 @@ MACHO-PPC-NEXT: Offset: 628
MACHO-PPC-NEXT: Alignment: 2
MACHO-PPC-NEXT: RelocationOffset: 0x0
MACHO-PPC-NEXT: RelocationCount: 0
-MACHO-PPC-NEXT: Type: 0x6
+MACHO-PPC-NEXT: Type: NonLazySymbolPointers (0x6)
MACHO-PPC-NEXT: Attributes [ (0x0)
MACHO-PPC-NEXT: ]
MACHO-PPC-NEXT: Reserved1: 0x1
@@ -281,7 +281,7 @@ MACHO-PPC-NEXT: Offset: 632
MACHO-PPC-NEXT: Alignment: 2
MACHO-PPC-NEXT: RelocationOffset: 0x2C4
MACHO-PPC-NEXT: RelocationCount: 1
-MACHO-PPC-NEXT: Type: 0x7
+MACHO-PPC-NEXT: Type: LazySymbolPointers (0x7)
MACHO-PPC-NEXT: Attributes [ (0x0)
MACHO-PPC-NEXT: ]
MACHO-PPC-NEXT: Reserved1: 0x2
@@ -300,7 +300,7 @@ MACHO-PPC64-NEXT: Offset: 608
MACHO-PPC64-NEXT: Alignment: 2
MACHO-PPC64-NEXT: RelocationOffset: 0x2D4
MACHO-PPC64-NEXT: RelocationCount: 5
-MACHO-PPC64-NEXT: Type: 0x0
+MACHO-PPC64-NEXT: Type: Regular (0x0)
MACHO-PPC64-NEXT: Attributes [ (0x800004)
MACHO-PPC64-NEXT: PureInstructions (0x800000)
MACHO-PPC64-NEXT: SomeInstructions (0x4)
@@ -319,7 +319,7 @@ MACHO-PPC64-NEXT: Offset: 672
MACHO-PPC64-NEXT: Alignment: 5
MACHO-PPC64-NEXT: RelocationOffset: 0x2FC
MACHO-PPC64-NEXT: RelocationCount: 4
-MACHO-PPC64-NEXT: Type: 0x8
+MACHO-PPC64-NEXT: Type: SymbolStubs (0x8)
MACHO-PPC64-NEXT: Attributes [ (0x800004)
MACHO-PPC64-NEXT: PureInstructions (0x800000)
MACHO-PPC64-NEXT: SomeInstructions (0x4)
@@ -338,7 +338,7 @@ MACHO-PPC64-NEXT: Offset: 704
MACHO-PPC64-NEXT: Alignment: 2
MACHO-PPC64-NEXT: RelocationOffset: 0x0
MACHO-PPC64-NEXT: RelocationCount: 0
-MACHO-PPC64-NEXT: Type: 0x0
+MACHO-PPC64-NEXT: Type: Regular (0x0)
MACHO-PPC64-NEXT: Attributes [ (0x0)
MACHO-PPC64-NEXT: ]
MACHO-PPC64-NEXT: Reserved1: 0x0
@@ -355,7 +355,7 @@ MACHO-PPC64-NEXT: Offset: 708
MACHO-PPC64-NEXT: Alignment: 2
MACHO-PPC64-NEXT: RelocationOffset: 0x0
MACHO-PPC64-NEXT: RelocationCount: 0
-MACHO-PPC64-NEXT: Type: 0x6
+MACHO-PPC64-NEXT: Type: NonLazySymbolPointers (0x6)
MACHO-PPC64-NEXT: Attributes [ (0x0)
MACHO-PPC64-NEXT: ]
MACHO-PPC64-NEXT: Reserved1: 0x1
@@ -372,7 +372,7 @@ MACHO-PPC64-NEXT: Offset: 716
MACHO-PPC64-NEXT: Alignment: 2
MACHO-PPC64-NEXT: RelocationOffset: 0x31C
MACHO-PPC64-NEXT: RelocationCount: 1
-MACHO-PPC64-NEXT: Type: 0x7
+MACHO-PPC64-NEXT: Type: LazySymbolPointers (0x7)
MACHO-PPC64-NEXT: Attributes [ (0x0)
MACHO-PPC64-NEXT: ]
MACHO-PPC64-NEXT: Reserved1: 0x2
@@ -392,7 +392,7 @@ MACHO-ARM-NEXT: Offset: 664
MACHO-ARM-NEXT: Alignment: 2
MACHO-ARM-NEXT: RelocationOffset: 0x2E0
MACHO-ARM-NEXT: RelocationCount: 9
-MACHO-ARM-NEXT: Type: 0x0
+MACHO-ARM-NEXT: Type: Regular (0x0)
MACHO-ARM-NEXT: Attributes [ (0x800004)
MACHO-ARM-NEXT: PureInstructions (0x800000)
MACHO-ARM-NEXT: SomeInstructions (0x4)
@@ -410,7 +410,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 0
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0xB
+MACHO-ARM-NEXT: Type: Coalesced (0xB)
MACHO-ARM-NEXT: Attributes [ (0x800000)
MACHO-ARM-NEXT: PureInstructions (0x800000)
MACHO-ARM-NEXT: ]
@@ -427,7 +427,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 0
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0xB
+MACHO-ARM-NEXT: Type: Coalesced (0xB)
MACHO-ARM-NEXT: Attributes [ (0x0)
MACHO-ARM-NEXT: ]
MACHO-ARM-NEXT: Reserved1: 0x0
@@ -443,7 +443,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 0
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0x8
+MACHO-ARM-NEXT: Type: SymbolStubs (0x8)
MACHO-ARM-NEXT: Attributes [ (0x0)
MACHO-ARM-NEXT: ]
MACHO-ARM-NEXT: Reserved1: 0x0
@@ -459,7 +459,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 0
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0x0
+MACHO-ARM-NEXT: Type: Regular (0x0)
MACHO-ARM-NEXT: Attributes [ (0x800000)
MACHO-ARM-NEXT: PureInstructions (0x800000)
MACHO-ARM-NEXT: ]
@@ -476,7 +476,7 @@ MACHO-ARM-NEXT: Offset: 724
MACHO-ARM-NEXT: Alignment: 2
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0x0
+MACHO-ARM-NEXT: Type: Regular (0x0)
MACHO-ARM-NEXT: Attributes [ (0x0)
MACHO-ARM-NEXT: ]
MACHO-ARM-NEXT: Reserved1: 0x0
@@ -492,7 +492,7 @@ MACHO-ARM-NEXT: Offset: 728
MACHO-ARM-NEXT: Alignment: 2
MACHO-ARM-NEXT: RelocationOffset: 0x0
MACHO-ARM-NEXT: RelocationCount: 0
-MACHO-ARM-NEXT: Type: 0x6
+MACHO-ARM-NEXT: Type: NonLazySymbolPointers (0x6)
MACHO-ARM-NEXT: Attributes [ (0x0)
MACHO-ARM-NEXT: ]
MACHO-ARM-NEXT: Reserved1: 0x0
diff --git a/llvm/tools/llvm-readobj/MachODumper.cpp b/llvm/tools/llvm-readobj/MachODumper.cpp
index d1c88c2a90e..84f67406650 100644
--- a/llvm/tools/llvm-readobj/MachODumper.cpp
+++ b/llvm/tools/llvm-readobj/MachODumper.cpp
@@ -214,6 +214,31 @@ static const EnumEntry<uint32_t> MachOHeaderFlags[] = {
LLVM_READOBJ_ENUM_ENT(MachO, MH_APP_EXTENSION_SAFE),
};
+static const EnumEntry<unsigned> MachOSectionTypes[] = {
+ { "Regular" , MachO::S_REGULAR },
+ { "ZeroFill" , MachO::S_ZEROFILL },
+ { "CStringLiterals" , MachO::S_CSTRING_LITERALS },
+ { "4ByteLiterals" , MachO::S_4BYTE_LITERALS },
+ { "8ByteLiterals" , MachO::S_8BYTE_LITERALS },
+ { "LiteralPointers" , MachO::S_LITERAL_POINTERS },
+ { "NonLazySymbolPointers" , MachO::S_NON_LAZY_SYMBOL_POINTERS },
+ { "LazySymbolPointers" , MachO::S_LAZY_SYMBOL_POINTERS },
+ { "SymbolStubs" , MachO::S_SYMBOL_STUBS },
+ { "ModInitFuncPointers" , MachO::S_MOD_INIT_FUNC_POINTERS },
+ { "ModTermFuncPointers" , MachO::S_MOD_TERM_FUNC_POINTERS },
+ { "Coalesced" , MachO::S_COALESCED },
+ { "GBZeroFill" , MachO::S_GB_ZEROFILL },
+ { "Interposing" , MachO::S_INTERPOSING },
+ { "16ByteLiterals" , MachO::S_16BYTE_LITERALS },
+ { "DTraceDOF" , MachO::S_DTRACE_DOF },
+ { "LazyDylibSymbolPointers" , MachO::S_LAZY_DYLIB_SYMBOL_POINTERS },
+ { "ThreadLocalRegular" , MachO::S_THREAD_LOCAL_REGULAR },
+ { "ThreadLocalZerofill" , MachO::S_THREAD_LOCAL_ZEROFILL },
+ { "ThreadLocalVariables" , MachO::S_THREAD_LOCAL_VARIABLES },
+ { "ThreadLocalVariablePointers" , MachO::S_THREAD_LOCAL_VARIABLE_POINTERS },
+ { "ThreadLocalInitFunctionPointers", MachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS }
+};
+
static const EnumEntry<unsigned> MachOSectionAttributes[] = {
{ "LocReloc" , 1 << 0 /*S_ATTR_LOC_RELOC */ },
{ "ExtReloc" , 1 << 1 /*S_ATTR_EXT_RELOC */ },
@@ -456,7 +481,7 @@ void MachODumper::printSectionHeaders(const MachOObjectFile *Obj) {
W.printHex("RelocationOffset", MOSection.RelocationTableOffset);
W.printNumber("RelocationCount", MOSection.NumRelocationTableEntries);
W.printEnum("Type", MOSection.Flags & 0xFF,
- makeArrayRef(MachOSectionAttributes));
+ makeArrayRef(MachOSectionTypes));
W.printFlags("Attributes", MOSection.Flags >> 8,
makeArrayRef(MachOSectionAttributes));
W.printHex("Reserved1", MOSection.Reserved1);
OpenPOWER on IntegriCloud