24 lines · plain
1# RUN: echo abcd > %t.txt2 3# Preserve input to verify it is not modified4# RUN: cp %t.txt %t-copy.txt5 6## -I binary -O binary preserves payload through in-memory representation.7# RUN: llvm-objcopy -I binary -O binary %t.txt %t.2.txt8# RUN: cmp %t.txt %t.2.txt9# RUN: cmp %t.txt %t-copy.txt10 11## If -O is not specified, it defaults to -I, i.e. "binary".12# RUN: llvm-objcopy -I binary %t.txt %t.3.txt13# RUN: cmp %t.txt %t.3.txt14 15## -I binary -O elf* creates an ELF. -O binary transforms it back to the16## original file.17# RUN: llvm-objcopy -I binary -O elf64-x86-64 %t.txt %t.o18# RUN: llvm-objcopy -O binary %t.o %t.4.txt19# RUN: cmp %t.txt %t.4.txt20 21## -B is ignored.22# RUN: llvm-objcopy -I binary -B i386:x86-64 -O binary %t.txt %t.5.txt23# RUN: cmp %t.txt %t.5.txt24