Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Commit

Permalink
Revert "[Tests] Output of od can be lower or upper case (llvm-objcopy…
Browse files Browse the repository at this point in the history
…/yaml2obj)."

This reverts commit r374343. It broke tests:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19066

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374358 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
gribozavr committed Oct 10, 2019
1 parent 6087268 commit 25c2389
Show file tree
Hide file tree
Showing 11 changed files with 1,300 additions and 1,300 deletions.
50 changes: 25 additions & 25 deletions test/tools/llvm-objcopy/ELF/basic-binary-copy.test
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x2 -v %t2 | FileCheck %s --ignore-case
# RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x0000000000001000
Content: "c3c3c3c3"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
Sections:
- Section: .text
# CHECK: 0000000 c3c3 c3c3
# SIZE: 4
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x2 -v %t2 | FileCheck %s
# RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE

!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x0000000000001000
Content: "c3c3c3c3"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
Sections:
- Section: .text

# CHECK: 0000000 c3c3 c3c3
# SIZE: 4
84 changes: 42 additions & 42 deletions test/tools/llvm-objcopy/ELF/binary-no-paddr.test
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x2 -v %t2 | FileCheck %s --ignore-case
# RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
AddressAlign: 0x0000000000001000
Content: "c3c3c3c3"
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x1004
AddressAlign: 0x0000000000000004
Content: "3232"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
VAddr: 0x1000
PAddr: 0x0000
Align: 0x1000
Sections:
- Section: .text
- Type: PT_LOAD
Flags: [ PF_R, PF_W ]
VAddr: 0x1004
PAddr: 0x0000
Align: 0x1000
Sections:
- Section: .data
# CHECK: 0000000 c3c3 c3c3 3232
# SIZE: 6
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x2 -v %t2 | FileCheck %s
# RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE

!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
AddressAlign: 0x0000000000001000
Content: "c3c3c3c3"
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x1004
AddressAlign: 0x0000000000000004
Content: "3232"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
VAddr: 0x1000
PAddr: 0x0000
Align: 0x1000
Sections:
- Section: .text
- Type: PT_LOAD
Flags: [ PF_R, PF_W ]
VAddr: 0x1004
PAddr: 0x0000
Align: 0x1000
Sections:
- Section: .data

# CHECK: 0000000 c3c3 c3c3 3232
# SIZE: 6
90 changes: 45 additions & 45 deletions test/tools/llvm-objcopy/ELF/binary-paddr.test
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x2 %t2 | FileCheck %s --ignore-case
# RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
AddressAlign: 0x0000000000001000
Content: "c3c3c3c3"
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x2000
AddressAlign: 0x0000000000001000
Content: "3232"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
VAddr: 0x1000
PAddr: 0x1000
Align: 0x1000
Sections:
- Section: .text
- Type: PT_LOAD
Flags: [ PF_R, PF_W ]
VAddr: 0x2000
PAddr: 0x4000
Align: 0x1000
Sections:
- Section: .data
# CHECK: 0000000 c3c3 c3c3 0000 0000 0000 0000 0000 0000
# CHECK-NEXT: 0000020 0000 0000 0000 0000 0000 0000 0000 0000
# CHECK-NEXT: *
# CHECK-NEXT: 0030000 3232
# SIZE: 12290
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x2 %t2 | FileCheck %s
# RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE

!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
AddressAlign: 0x0000000000001000
Content: "c3c3c3c3"
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x2000
AddressAlign: 0x0000000000001000
Content: "3232"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
VAddr: 0x1000
PAddr: 0x1000
Align: 0x1000
Sections:
- Section: .text
- Type: PT_LOAD
Flags: [ PF_R, PF_W ]
VAddr: 0x2000
PAddr: 0x4000
Align: 0x1000
Sections:
- Section: .data

# CHECK: 0000000 c3c3 c3c3 0000 0000 0000 0000 0000 0000
# CHECK-NEXT: 0000020 0000 0000 0000 0000 0000 0000 0000 0000
# CHECK-NEXT: *
# CHECK-NEXT: 0030000 3232
# SIZE: 12290
76 changes: 38 additions & 38 deletions test/tools/llvm-objcopy/ELF/binary-segment-layout.test
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x2 %t2 | FileCheck %s --ignore-case
# RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x0000000000001000
Address: 0x00
Content: "c3c3c3c3"
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x0000000000000008
Address: 0x08
Content: "3232"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
VAddr: 0x00
Sections:
- Section: .text
- Type: PT_LOAD
Flags: [ PF_R ]
VAddr: 0x08
Sections:
- Section: .data
# CHECK: 0000000 c3c3 c3c3 0000 0000 3232
# SIZE: 10
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x2 %t2 | FileCheck %s
# RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE

!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x0000000000001000
Address: 0x00
Content: "c3c3c3c3"
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x0000000000000008
Address: 0x08
Content: "3232"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
VAddr: 0x00
Sections:
- Section: .text
- Type: PT_LOAD
Flags: [ PF_R ]
VAddr: 0x08
Sections:
- Section: .data

# CHECK: 0000000 c3c3 c3c3 0000 0000 3232
# SIZE: 10
80 changes: 40 additions & 40 deletions test/tools/llvm-objcopy/ELF/check-addr-offset-align-binary.test
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x1 %t2 | FileCheck %s --ignore-case
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
AddressAlign: 0x0000000000001000
Content: "c3c3c3c3"
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x1008
AddressAlign: 0x0000000000000008
Content: "3232"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
VAddr: 0x1000
PAddr: 0x1000
Align: 0x1000
Sections:
- Section: .text
- Type: PT_LOAD
Flags: [ PF_R, PF_W ]
VAddr: 0x1008
PAddr: 0x1008
Align: 0x1000
Sections:
- Section: .data
# CHECK: 0000000 c3 c3 c3 c3 00 00 00 00 32 32
# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy -O binary %t %t2
# RUN: od -t x1 %t2 | FileCheck %s

!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x1000
AddressAlign: 0x0000000000001000
Content: "c3c3c3c3"
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0x1008
AddressAlign: 0x0000000000000008
Content: "3232"
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
VAddr: 0x1000
PAddr: 0x1000
Align: 0x1000
Sections:
- Section: .text
- Type: PT_LOAD
Flags: [ PF_R, PF_W ]
VAddr: 0x1008
PAddr: 0x1008
Align: 0x1000
Sections:
- Section: .data

# CHECK: 0000000 c3 c3 c3 c3 00 00 00 00 32 32
Loading

0 comments on commit 25c2389

Please sign in to comment.