You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,36 +0,0 @@
|
||||
# RUN: yaml2obj %s > %t
|
||||
# RUN: llvm-objcopy %t %t2
|
||||
# RUN: llvm-readobj -symbols %t2 | FileCheck %s
|
||||
|
||||
!ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
Machine: EM_X86_64
|
||||
Symbols:
|
||||
Global:
|
||||
- Name: test
|
||||
Index: SHN_ABS
|
||||
Value: 0x1234
|
||||
|
||||
#CHECK: Symbols [
|
||||
#CHECK-NEXT: Symbol {
|
||||
#CHECK-NEXT: Name:
|
||||
#CHECK-NEXT: Value: 0x0
|
||||
#CHECK-NEXT: Size: 0
|
||||
#CHECK-NEXT: Binding: Local (0x0)
|
||||
#CHECK-NEXT: Type: None (0x0)
|
||||
#CHECK-NEXT: Other: 0
|
||||
#CHECK-NEXT: Section: Undefined (0x0)
|
||||
#CHECK-NEXT: }
|
||||
#CHECK-NEXT: Symbol {
|
||||
#CHECK-NEXT: Name: test
|
||||
#CHECK-NEXT: Value: 0x1234
|
||||
#CHECK-NEXT: Size: 0
|
||||
#CHECK-NEXT: Binding: Global (0x1)
|
||||
#CHECK-NEXT: Type: None (0x0)
|
||||
#CHECK-NEXT: Other: 0
|
||||
#CHECK-NEXT: Section: Absolute (0xFFF1)
|
||||
#CHECK-NEXT: }
|
||||
#CHECK-NEXT:]
|
@ -1,36 +0,0 @@
|
||||
# RUN: yaml2obj %s > %t
|
||||
# RUN: echo 0000 > %t.sec
|
||||
# RUN: llvm-objcopy -R=.test2 -add-section=.test2=%t.sec %t %t2
|
||||
# RUN: llvm-readobj -file-headers -sections -section-data %t2 | FileCheck %s
|
||||
|
||||
!ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_REL
|
||||
Machine: EM_X86_64
|
||||
Sections:
|
||||
- Name: .test1
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Content: "c3c3c3c3"
|
||||
- Name: .test2
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Content: "DEADBEEF"
|
||||
- Name: .test3
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Content: "32323232"
|
||||
|
||||
# CHECK: SectionHeaderCount: 7
|
||||
|
||||
# CHECK: Name: .test1
|
||||
# CHECK: Name: .test3
|
||||
# CHECK: Name: .symtab
|
||||
# CHECK: Name: .strtab
|
||||
# CHECK: Name: .shstrtab
|
||||
# CHECK: Name: .test2
|
||||
# CHECK: SectionData (
|
||||
# CHECK-NEXT: 0000: 30303030
|
||||
# CHECK-NEXT: )
|
@ -1,37 +0,0 @@
|
||||
# RUN: yaml2obj %s > %t
|
||||
# RUN: llvm-objcopy -O binary -j .test2 %t %t.sec
|
||||
# RUN: llvm-objcopy -R=.test2 %t %t2
|
||||
# RUN: llvm-objcopy -add-section=.test2=%t.sec %t2 %t3
|
||||
# RUN: llvm-readobj -file-headers -sections -section-data %t3 | FileCheck %s
|
||||
|
||||
!ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_REL
|
||||
Machine: EM_X86_64
|
||||
Sections:
|
||||
- Name: .test1
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Content: "c3c3c3c3"
|
||||
- Name: .test2
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Content: "DEADBEEF"
|
||||
- Name: .test3
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Content: "32323232"
|
||||
|
||||
# CHECK: SectionHeaderCount: 7
|
||||
|
||||
# CHECK: Name: .test1
|
||||
# CHECK: Name: .test3
|
||||
# CHECK: Name: .symtab
|
||||
# CHECK: Name: .strtab
|
||||
# CHECK: Name: .shstrtab
|
||||
# CHECK: Name: .test2
|
||||
# CHECK: SectionData (
|
||||
# CHECK-NEXT: 0000: DEADBEEF
|
||||
# CHECK-NEXT: )
|
@ -1,62 +0,0 @@
|
||||
# This test tests that if two non-overlapping segments are right next to each
|
||||
# other no problems arise.
|
||||
|
||||
# RUN: yaml2obj %s -o %t
|
||||
# RUN: llvm-objcopy %t %t2
|
||||
# RUN: llvm-readobj --program-headers %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 ]
|
||||
AddressAlign: 0x1000
|
||||
Size: 24
|
||||
- Name: .text2
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
AddressAlign: 0x10
|
||||
Size: 16
|
||||
ProgramHeaders:
|
||||
- Type: PT_LOAD
|
||||
Flags: [ PF_X, PF_R ]
|
||||
Sections:
|
||||
- Section: .text
|
||||
- Type: PT_LOAD
|
||||
Flags: [ PF_X, PF_R ]
|
||||
Sections:
|
||||
- Section: .text2
|
||||
|
||||
#CHECK: ProgramHeaders [
|
||||
#CHECK-NEXT: ProgramHeader {
|
||||
#CHECK-NEXT: Type: PT_LOAD (0x1)
|
||||
#CHECK-NEXT: Offset: 0x1000
|
||||
#CHECK-NEXT: VirtualAddress: 0x0
|
||||
#CHECK-NEXT: PhysicalAddress: 0x0
|
||||
#CHECK-NEXT: FileSize: 24
|
||||
#CHECK-NEXT: MemSize: 24
|
||||
#CHECK-NEXT: Flags [ (0x5)
|
||||
#CHECK-NEXT: PF_R (0x4)
|
||||
#CHECK-NEXT: PF_X (0x1)
|
||||
#CHECK-NEXT: ]
|
||||
#CHECK-NEXT: Alignment: 4096
|
||||
#CHECK-NEXT: }
|
||||
#CHECK-NEXT: ProgramHeader {
|
||||
#CHECK-NEXT: Type: PT_LOAD (0x1)
|
||||
#CHECK-NEXT: Offset: 0x1020
|
||||
#CHECK-NEXT: VirtualAddress: 0x0
|
||||
#CHECK-NEXT: PhysicalAddress: 0x0
|
||||
#CHECK-NEXT: FileSize: 16
|
||||
#CHECK-NEXT: MemSize: 16
|
||||
#CHECK-NEXT: Flags [ (0x5)
|
||||
#CHECK-NEXT: PF_R (0x4)
|
||||
#CHECK-NEXT: PF_X (0x1)
|
||||
#CHECK-NEXT: ]
|
||||
#CHECK-NEXT: Alignment: 16
|
||||
#CHECK-NEXT: }
|
||||
#CHECK-NEXT:]
|
@ -1,37 +0,0 @@
|
||||
# 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
|
||||
Content: "c3c3c3c3"
|
||||
- Name: .data
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
AddressAlign: 0x0000000000001000
|
||||
Content: "3232"
|
||||
ProgramHeaders:
|
||||
- Type: PT_LOAD
|
||||
Flags: [ PF_X, PF_R ]
|
||||
Sections:
|
||||
- Section: .text
|
||||
- Type: PT_LOAD
|
||||
Flags: [ PF_R ]
|
||||
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: 0010000 3232
|
||||
# SIZE: 4098
|
@ -1,25 +0,0 @@
|
||||
# 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
|
@ -1,47 +0,0 @@
|
||||
# RUN: yaml2obj %s > %t
|
||||
# RUN: llvm-objcopy %t %t2
|
||||
# RUN: llvm-readobj -sections %t2 | FileCheck %s
|
||||
|
||||
!ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
Machine: EM_X86_64
|
||||
Sections:
|
||||
- Name: .bss
|
||||
Type: SHT_NOBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
AddressAlign: 0x0000000000000010
|
||||
Size: 64
|
||||
- Name: .text
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
AddressAlign: 0x0000000000000010
|
||||
Content: "00000000"
|
||||
|
||||
# CHECK: Type: SHT_NULL
|
||||
|
||||
# CHECK: Name: .bss
|
||||
# CHECK-NEXT: Type: SHT_NOBITS
|
||||
# CHECK-NEXT: Flags [
|
||||
# CHECK-NEXT: SHF_ALLOC
|
||||
# CHECK-NEXT: ]
|
||||
# CHECK-NEXT: Address:
|
||||
# CHECK-NEXT: Offset: [[OFFSET:0x[0-9A-F]+]]
|
||||
# CHECK-NEXT: Size: 64
|
||||
|
||||
# CHECK: Name: .text
|
||||
# CHECK-NEXT: Type: SHT_PROGBITS
|
||||
# CHECK-NEXT: Flags [
|
||||
# CHECK-NEXT: SHF_ALLOC
|
||||
# CHECK-NEXT: SHF_EXECINSTR
|
||||
# CHECK-NEXT: ]
|
||||
# CHECK-NEXT: Address:
|
||||
# CHECK-NEXT: Offset: [[OFFSET]]
|
||||
# CHECK-NEXT: Size: 4
|
||||
|
||||
# CHECK: Name: .shstrtab
|
||||
# CHECK-NEXT: Type: SHT_STRTAB
|
||||
# CHECK-NEXT: Flags [
|
||||
# CHECK-NEXT: ]
|
@ -1,19 +0,0 @@
|
||||
# RUN: yaml2obj %s > %t
|
||||
# RUN: llvm-objcopy -strip-non-alloc -keep=.test %t %t2
|
||||
# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s
|
||||
|
||||
!ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_REL
|
||||
Machine: EM_X86_64
|
||||
Sections:
|
||||
- Name: .test
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ ]
|
||||
|
||||
# CHECK: SectionHeaderCount: 3
|
||||
|
||||
# CHECK: Name: .test
|
||||
# CHECK: Name: .shstrtab
|
@ -1,23 +0,0 @@
|
||||
# RUN: yaml2obj %s > %t
|
||||
# RUN: llvm-objcopy -only-keep=.test %t %t2
|
||||
# RUN: llvm-objcopy -j=.test %t %t3
|
||||
# RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s
|
||||
# RUN: diff %t2 %t3
|
||||
|
||||
!ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_REL
|
||||
Machine: EM_X86_64
|
||||
Sections:
|
||||
- Name: .test
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ ]
|
||||
|
||||
# CHECK: SectionHeaderCount: 5
|
||||
|
||||
# CHECK: Name: .test
|
||||
# CHECK: Name: .symtab
|
||||
# CHECK: Name: .strtab
|
||||
# CHECK: Name: .shstrtab
|
@ -1,91 +0,0 @@
|
||||
# RUN: yaml2obj %s > %t
|
||||
# RUN: llvm-objcopy %t %t2
|
||||
# RUN: llvm-readobj -relocations %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: 0x0000000000000010
|
||||
Content: "0000000000000000"
|
||||
- Name: .rel.text
|
||||
Type: SHT_REL
|
||||
Link: .symtab
|
||||
Info: .text
|
||||
Relocations:
|
||||
- Offset: 0x1000
|
||||
Symbol: foo
|
||||
Type: R_X86_64_PC32
|
||||
- Name: .data
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Address: 0x2000
|
||||
AddressAlign: 0x0000000000000010
|
||||
Content: "0000000000000000"
|
||||
- Name: .rel.data
|
||||
Type: SHT_REL
|
||||
Link: .symtab
|
||||
Info: .data
|
||||
Relocations:
|
||||
- Offset: 0x2000
|
||||
Symbol: bar
|
||||
Type: R_X86_64_PC32
|
||||
- Name: .rela.data
|
||||
Type: SHT_RELA
|
||||
Link: .symtab
|
||||
Info: .data
|
||||
Relocations:
|
||||
- Offset: 0x2000
|
||||
Symbol: barA
|
||||
Type: R_X86_64_PC32
|
||||
Addend: 0x17
|
||||
- Name: .rela.text
|
||||
Type: SHT_RELA
|
||||
Link: .symtab
|
||||
Info: .text
|
||||
Relocations:
|
||||
- Offset: 0x1000
|
||||
Symbol: fooA
|
||||
Type: R_X86_64_PC32
|
||||
Addend: 0x13
|
||||
Symbols:
|
||||
Global:
|
||||
- Name: _start
|
||||
Type: STT_FUNC
|
||||
Section: .text
|
||||
Value: 0x1000
|
||||
Size: 4
|
||||
- Name: foo
|
||||
Type: STT_FUNC
|
||||
Size: 4
|
||||
- Name: fooA
|
||||
Type: STT_FUNC
|
||||
Size: 4
|
||||
- Name: bar
|
||||
Type: STT_OBJECT
|
||||
Size: 4
|
||||
- Name: barA
|
||||
Type: STT_OBJECT
|
||||
Size: 4
|
||||
|
||||
# CHECK: Relocations [
|
||||
# CHECK-NEXT: Section (2) .rel.text {
|
||||
# CHECK-NEXT: 0x1000 R_X86_64_PC32 foo 0x0
|
||||
# CHECK-NEXT: }
|
||||
# CHECK-NEXT: Section (4) .rel.data {
|
||||
# CHECK-NEXT: 0x2000 R_X86_64_PC32 bar 0x0
|
||||
# CHECK-NEXT: }
|
||||
# CHECK-NEXT: Section (5) .rela.data {
|
||||
# CHECK-NEXT: 0x2000 R_X86_64_PC32 barA 0x17
|
||||
# CHECK-NEXT: }
|
||||
# CHECK-NEXT: Section (6) .rela.text {
|
||||
# CHECK-NEXT: 0x1000 R_X86_64_PC32 fooA 0x13
|
||||
# CHECK-NEXT: }
|
||||
# CHECK-NEXT:]
|
@ -1,34 +0,0 @@
|
||||
# RUN: yaml2obj %s -o %t
|
||||
# RUN: llvm-objcopy -R=.note -O binary %t %t2
|
||||
# RUN: od -Ax -t x1 %t2 | FileCheck %s
|
||||
|
||||
!ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_EXEC
|
||||
Machine: EM_X86_64
|
||||
Sections:
|
||||
- Name: .note
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Address: 0x1000
|
||||
AddressAlign: 0x1000
|
||||
Content: "32323232"
|
||||
Size: 32
|
||||
- Name: .rodata
|
||||
Flags: [ SHF_ALLOC ]
|
||||
Type: SHT_PROGBITS
|
||||
Address: 0x1020
|
||||
Size: 4064
|
||||
Content: "DEADBEEF"
|
||||
ProgramHeaders:
|
||||
- Type: PT_LOAD
|
||||
Flags: [ PF_R ]
|
||||
VAddr: 0x1000
|
||||
PAddr: 0x1000
|
||||
Sections:
|
||||
- Section: .note
|
||||
- Section: .rodata
|
||||
|
||||
# CHECK: 000000 de ad be ef
|
@ -1,46 +0,0 @@
|
||||
# RUN: yaml2obj %s -o %t
|
||||
# RUN: llvm-objcopy -R .text -R .text3 -O binary %t %t2
|
||||
# RUN: od -Ax -t x1 %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: 0x1000
|
||||
Content: "c3c3c3c3"
|
||||
Size: 0x1000
|
||||
- Name: .text2
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
Address: 0x2000
|
||||
AddressAlign: 0x1000
|
||||
Content: "DEADBEEF"
|
||||
Size: 0x1000
|
||||
- Name: .text3
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
Address: 0x3000
|
||||
AddressAlign: 0x1000
|
||||
Content: "32323232"
|
||||
Size: 0x1000
|
||||
ProgramHeaders:
|
||||
- Type: PT_LOAD
|
||||
Flags: [ PF_R ]
|
||||
VAddr: 0x1000
|
||||
PAddr: 0x1000
|
||||
Sections:
|
||||
- Section: .text
|
||||
- Section: .text2
|
||||
- Section: .text3
|
||||
|
||||
# CHECK: 000000 de ad be ef
|
||||
|
||||
# SIZE: 4096
|
@ -1,47 +0,0 @@
|
||||
# RUN: yaml2obj %s -o %t
|
||||
# RUN: llvm-objcopy -R .text3 -O binary %t %t2
|
||||
# RUN: od -Ax -v -t x1 %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: 0x1000
|
||||
Content: "c3c3c3c3"
|
||||
Size: 0x1000
|
||||
- Name: .text2
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
Address: 0x2000
|
||||
AddressAlign: 0x1000
|
||||
Content: "DEADBEEF"
|
||||
Size: 0x1000
|
||||
- Name: .text3
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
Address: 0x3000
|
||||
AddressAlign: 0x1000
|
||||
Content: "32323232"
|
||||
Size: 0x1000
|
||||
ProgramHeaders:
|
||||
- Type: PT_LOAD
|
||||
Flags: [ PF_R ]
|
||||
VAddr: 0x1000
|
||||
PAddr: 0x1000
|
||||
Sections:
|
||||
- Section: .text
|
||||
- Section: .text2
|
||||
- Section: .text3
|
||||
|
||||
# CHECK: 000000 c3 c3 c3 c3
|
||||
# CHECK: 001000 de ad be ef
|
||||
|
||||
# SIZE: 8192
|
@ -1,48 +0,0 @@
|
||||
# RUN: yaml2obj %s -o %t
|
||||
# RUN: llvm-objcopy -R .text2 -O binary %t %t2
|
||||
# RUN: od -Ax -v -t x1 %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: 0x1000
|
||||
Content: "c3c3c3c3"
|
||||
Size: 0x1000
|
||||
- Name: .text2
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
Address: 0x2000
|
||||
AddressAlign: 0x1000
|
||||
Content: "DEADBEEF"
|
||||
Size: 0x1000
|
||||
- Name: .text3
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||
Address: 0x3000
|
||||
AddressAlign: 0x1000
|
||||
Content: "32323232"
|
||||
Size: 0x1000
|
||||
ProgramHeaders:
|
||||
- Type: PT_LOAD
|
||||
Flags: [ PF_R ]
|
||||
VAddr: 0x1000
|
||||
PAddr: 0x1000
|
||||
Sections:
|
||||
- Section: .text
|
||||
- Section: .text2
|
||||
- Section: .text3
|
||||
|
||||
# CHECK: 000000 c3 c3 c3 c3
|
||||
# CHECK: 001000 00 00 00 00
|
||||
# CHECK: 002000 32 32 32 32
|
||||
|
||||
# SIZE: 12288
|
@ -1,18 +0,0 @@
|
||||
# REQUIRES: system-windows
|
||||
# RUN: yaml2obj %s > %t.o
|
||||
# RUN: rm -f %t2.o
|
||||
# RUN: cp %t.o %t2.o
|
||||
# RUN: attrib +r %t2.o
|
||||
|
||||
# This fails because it cannot replace %t2.o
|
||||
# RUN: not llvm-objcopy %t.o %t2.o
|
||||
|
||||
# But it doesn't leave any temporary files behind.
|
||||
# RUN: not ls %t2.o.tmp*
|
||||
|
||||
!ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
Type: ET_REL
|
||||
Machine: EM_X86_64
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user