[test][llvm-objcopy/mac] Move test to new file
authorKeith Smiley <keithbsmiley@gmail.com>
Mon, 7 Feb 2022 17:01:14 +0000 (09:01 -0800)
committerKeith Smiley <keithbsmiley@gmail.com>
Tue, 8 Feb 2022 03:59:04 +0000 (19:59 -0800)
Follow up from https://reviews.llvm.org/D118526

Differential Revision: https://reviews.llvm.org/D119149

llvm/test/tools/llvm-objcopy/MachO/load-commands.yaml [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/MachO/redefine-symbol.s

diff --git a/llvm/test/tools/llvm-objcopy/MachO/load-commands.yaml b/llvm/test/tools/llvm-objcopy/MachO/load-commands.yaml
new file mode 100644 (file)
index 0000000..c2d5754
--- /dev/null
@@ -0,0 +1,19 @@
+--- !mach-o
+FileHeader:
+  magic:           0xFEEDFACE
+  cputype:         0x0000000C
+  cpusubtype:      0x00000009
+  filetype:        0x00000001
+  ncmds:           1
+  sizeofcmds:      16
+  flags:           0x00002000
+LoadCommands:
+  - cmd:          LC_LINKER_OPTION
+    cmdsize:      16
+    count:        1
+    PayloadBytes: [ 0x2D, 0x6C, 0x63, 0x0 ]
+...
+
+# RUN: yaml2obj %s > %t
+# RUN: llvm-objcopy %t %t.copy
+# RUN: cmp %t %t.copy
index 5919c93..82d20ca 100644 (file)
@@ -43,7 +43,6 @@
 # RUN: llvm-objcopy --strip-symbol _ba --redefine-sym _foo=_ba %t %t.noba
 # RUN: llvm-readobj --symbols %t.noba | FileCheck %s --check-prefix=NOTSTRIPPED
 
-.linker_option "-lc"
 .globl _func
 _func: