File: binary-input-with-arch.test

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (26 lines) | stat: -rw-r--r-- 1,000 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# RUN: echo -n abcd > %t.x-txt
# Preserve input to verify it is not modified.
# RUN: cp %t.x-txt %t-copy.txt
# RUN: llvm-objcopy -I binary -B i386 -O elf64-x86-64 %t.x-txt %t.o
# RUN: llvm-readobj --file-headers %t.o | FileCheck %s --check-prefixes=CHECK,SYSV
# RUN: cmp %t.x-txt %t-copy.txt

# Many uses of objcopy use no spaces in the flags, make sure that also works.
# RUN: llvm-objcopy -Ibinary -Bi386 -Oelf64-x86-64 %t.x-txt %t-no-spaces.o
# RUN: cmp %t.o %t-no-spaces.o

# elf64-x86-64-freebsd sets the OS/ABI field.
# RUN: llvm-objcopy -I binary -B i386 -O elf64-x86-64-freebsd %t.x-txt %t.freebsd.o
# RUN: llvm-readobj --file-headers %t.freebsd.o | FileCheck %s --check-prefixes=CHECK,FREEBSD

# CHECK:      Format: ELF64-x86-64
# CHECK-NEXT: Arch: x86_64
# CHECK-NEXT: AddressSize: 64bit

# CHECK: Class: 64-bit
# CHECK: DataEncoding: LittleEndian
# SYSV:    OS/ABI: SystemV
# FREEBSD: OS/ABI: FreeBSD
# CHECK: Machine: EM_X86_64
# CHECK: HeaderSize: 64
# CHECK: SectionHeaderEntrySize: 64