summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/binary-input-and-output.test
blob: 0fc2a4bc3c17c6db63e017e900f12b4bc9cc295e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# RUN: echo abcd > %t.txt

# Preserve input to verify it is not modified
# RUN: cp %t.txt %t-copy.txt

# -I binary -O binary preserves payload through in-memory representation
# RUN: llvm-objcopy -I binary -B i386:x86-64 -O binary %t.txt %t.2.txt
# RUN: cmp %t.txt %t.2.txt
# RUN: cmp %t.txt %t-copy.txt

# -I binary -O binary preserves payload through an intermediate object file
# RUN: llvm-objcopy -I binary -B i386:x86-64 %t.txt %t.o
# RUN: llvm-objcopy -O binary %t.o %t.3.txt
# RUN: cmp %t.txt %t.3.txt
# RUN: cmp %t.txt %t-copy.txt
OpenPOWER on IntegriCloud