xref: /llvm-project/llvm/test/tools/llvm-objcopy/ELF/binary-input-and-output.test (revision 6e4dc6f23f0e755b29b1e9bba76632a536f5f534)
1# RUN: echo abcd > %t.txt
2
3# Preserve input to verify it is not modified
4# RUN: cp %t.txt %t-copy.txt
5
6# -I binary -O binary preserves payload through in-memory representation
7# RUN: llvm-objcopy -I binary -B i386:x86-64 -O binary %t.txt %t.2.txt
8# RUN: cmp %t.txt %t.2.txt
9# RUN: cmp %t.txt %t-copy.txt
10
11# -I binary -O binary preserves payload through an intermediate object file
12# RUN: llvm-objcopy -I binary -B i386:x86-64 %t.txt %t.o
13# RUN: llvm-objcopy -O binary %t.o %t.3.txt
14# RUN: cmp %t.txt %t.3.txt
15# RUN: cmp %t.txt %t-copy.txt
16