aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/ObjectYAML
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2020-11-10 16:54:22 -0800
committerVedant Kumar <vsk@apple.com>2020-11-11 10:15:54 -0800
commitd76e01a6a7c26051146fa65776cf63eb17f46fa3 (patch)
tree74350a1dd32593e5e880e4c45ce501264ca895f7 /llvm/test/ObjectYAML
parent782a93cc9abeee9bd90f7be92db4eb3895e15384 (diff)
downloadllvm-d76e01a6a7c26051146fa65776cf63eb17f46fa3.zip
llvm-d76e01a6a7c26051146fa65776cf63eb17f46fa3.tar.gz
llvm-d76e01a6a7c26051146fa65776cf63eb17f46fa3.tar.bz2
[MachO] Allow the LC_IDENT load command
xnu coredumps include an LC_IDENT load command. It's helpful to be able to just ignore these. IIUC an interested client can grab the identifier using the MachOObjectFile::load_commands() API. The status quo is that llvm bails out when it finds an LC_IDENT because the command is obsolete (see isLoadCommandObsolete). Differential Revision: https://reviews.llvm.org/D91221
Diffstat (limited to 'llvm/test/ObjectYAML')
-rw-r--r--llvm/test/ObjectYAML/MachO/lc-ident.yaml22
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/ObjectYAML/MachO/lc-ident.yaml b/llvm/test/ObjectYAML/MachO/lc-ident.yaml
new file mode 100644
index 0000000..0bafea9
--- /dev/null
+++ b/llvm/test/ObjectYAML/MachO/lc-ident.yaml
@@ -0,0 +1,22 @@
+# RUN: yaml2obj %s | obj2yaml | FileCheck %s
+
+--- !mach-o
+FileHeader:
+ magic: 0xFEEDFACF
+ cputype: 0x01000007
+ cpusubtype: 0x80000003
+ filetype: 0x00000002
+ ncmds: 1
+ sizeofcmds: 16
+ flags: 0x00218085
+ reserved: 0x00000000
+LoadCommands:
+ - cmd: LC_IDENT
+ cmdsize: 16
+ PayloadBytes: [ 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 ]
+...
+
+# CHECK: LoadCommands:
+# CHECK-NEXT: - cmd: LC_IDENT
+# CHECK-NEXT: cmdsize: 16
+# CHECK-NEXT: PayloadBytes: [ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 ]