Files
clang-p2996/llvm/test/tools/llvm-objcopy/ELF/binary-input-arch.test
Jordan Rupprecht 298ea3f577 [llvm-objcopy][NFC] Consistenly use two dashes for flags in tests.
Summary:
As pointed out in D53667, our use of hyphens in flags can be inconsistent, mixing `-` with `--`. This change makes all long style flags use `--`.

Automatically changed via:

```
find test/tools/llvm-objcopy/ELF -type f | xargs sed -i 's/ -\([a-zA-Z]\{3\}\)/ --\1/g'
```

Two false positives were manually fixed/reverted.

Reviewers: jhenderson, espindola, alexshap

Reviewed By: jhenderson

Subscribers: emaste, javed.absar, arichardson, fedor.sergeev, jakehehrlich, llvm-commits

Differential Revision: https://reviews.llvm.org/D56513

llvm-svn: 350944
2019-01-11 18:06:31 +00:00

76 lines
2.8 KiB
Plaintext

# RUN: echo abcd > %t.txt
# RUN: llvm-objcopy -I binary -B aarch64 %t.txt %t.aarch64.o
# RUN: llvm-readobj --file-headers %t.aarch64.o | FileCheck %s --check-prefixes=CHECK,AARCH64,64
# RUN: llvm-objcopy -I binary -B arm %t.txt %t.arm.o
# RUN: llvm-readobj --file-headers %t.arm.o | FileCheck %s --check-prefixes=CHECK,ARM,32
# RUN: llvm-objcopy -I binary -B i386 %t.txt %t.i386.o
# RUN: llvm-readobj --file-headers %t.i386.o | FileCheck %s --check-prefixes=CHECK,I386,32
# RUN: llvm-objcopy -I binary -B i386:x86-64 %t.txt %t.i386_x86-64.o
# RUN: llvm-readobj --file-headers %t.i386_x86-64.o | FileCheck %s --check-prefixes=CHECK,X86-64,64
# RUN: llvm-objcopy -I binary -B powerpc:common64 %t.txt %t.powerpc_common64.o
# RUN: llvm-readobj --file-headers %t.powerpc_common64.o | FileCheck %s --check-prefixes=CHECK,PPC,64
# RUN: llvm-objcopy -I binary -B sparc %t.txt %t.sparc.o
# RUN: llvm-readobj --file-headers %t.sparc.o | FileCheck %s --check-prefixes=CHECK,SPARC,32
# RUN: llvm-objcopy -I binary -B x86-64 %t.txt %t.x86-64.o
# RUN: llvm-readobj --file-headers %t.x86-64.o | FileCheck %s --check-prefixes=CHECK,X86-64,64
# CHECK: Format:
# AARCH64-SAME: ELF64-aarch64-little
# ARM-SAME: ELF32-arm-little
# I386-SAME: ELF32-i386
# PPC-SAME: ELF64-ppc64
# SPARC-SAME: ELF32-sparc
# X86-64-SAME: ELF64-x86-64
# AARCH64-NEXT: Arch: aarch64
# ARM-NEXT: Arch: arm
# I386-NEXT: Arch: i386
# PPC-NEXT: Arch: powerpc64le
# SPARC-NEXT: Arch: sparcel
# X86-64-NEXT: Arch: x86_64
# 32-NEXT: AddressSize: 32bit
# 64-NEXT: AddressSize: 64bit
# CHECK: ElfHeader {
# CHECK-NEXT: Ident {
# CHECK-NEXT: Magic: (7F 45 4C 46)
# 32-NEXT: Class: 32-bit (0x1)
# 64-NEXT: Class: 64-bit (0x2)
# CHECK-NEXT: DataEncoding: LittleEndian (0x1)
# CHECK-NEXT: FileVersion: 1
# CHECK-NEXT: OS/ABI: SystemV (0x0)
# CHECK-NEXT: ABIVersion: 0
# CHECK-NEXT: Unused: (00 00 00 00 00 00 00)
# CHECK-NEXT: }
# CHECK-NEXT: Type: Relocatable (0x1)
# AARCH64-NEXT: Machine: EM_AARCH64 (0xB7)
# ARM-NEXT: Machine: EM_ARM (0x28)
# I386-NEXT: Machine: EM_386 (0x3)
# PPC-NEXT: Machine: EM_PPC64 (0x15)
# SPARC-NEXT: Machine: EM_SPARC (0x2)
# X86-64-NEXT: Machine: EM_X86_64 (0x3E)
# CHECK-NEXT: Version: 1
# CHECK-NEXT: Entry: 0x0
# CHECK-NEXT: ProgramHeaderOffset:
# CHECK-NEXT: SectionHeaderOffset:
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# 32-NEXT: HeaderSize: 52
# 64-NEXT: HeaderSize: 64
# 32-NEXT: ProgramHeaderEntrySize: 0
# 64-NEXT: ProgramHeaderEntrySize: 0
# CHECK-NEXT: ProgramHeaderCount: 0
# 32-NEXT: SectionHeaderEntrySize: 40
# 64-NEXT: SectionHeaderEntrySize: 64
# CHECK-NEXT: SectionHeaderCount: 4
# CHECK-NEXT: StringTableSectionIndex:
# CHECK-NEXT: }