1 # RUN: echo -n abcd > %t.x-txt
2 # Preserve input to verify it is not modified.
3 # RUN: cp %t.x-txt %t-copy.txt
4 # RUN: llvm-objcopy -I binary -B i386 -O elf64-x86-64 %t.x-txt %t.o
5 # RUN: llvm-readobj --file-headers %t.o | FileCheck %s --check-prefixes=CHECK,SYSV
6 # RUN: cmp %t.x-txt %t-copy.txt
8 # Many uses of objcopy use no spaces in the flags, make sure that also works.
9 # RUN: llvm-objcopy -Ibinary -Bi386 -Oelf64-x86-64 %t.x-txt %t-no-spaces.o
10 # RUN: cmp %t.o %t-no-spaces.o
12 # elf64-x86-64-freebsd sets the OS/ABI field.
13 # RUN: llvm-objcopy -I binary -B i386 -O elf64-x86-64-freebsd %t.x-txt %t.freebsd.o
14 # RUN: llvm-readobj --file-headers %t.freebsd.o | FileCheck %s --check-prefixes=CHECK,FREEBSD
16 # CHECK: Format: ELF64-x86-64
17 # CHECK-NEXT: Arch: x86_64
18 # CHECK-NEXT: AddressSize: 64bit
20 # CHECK: Class: 64-bit
21 # CHECK: DataEncoding: LittleEndian
22 # SYSV: OS/ABI: SystemV
23 # FREEBSD: OS/ABI: FreeBSD
24 # CHECK: Machine: EM_X86_64
25 # CHECK: HeaderSize: 64
26 # CHECK: SectionHeaderEntrySize: 64