summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Dmitriev <serguei.n.dmitriev@intel.com>2019-11-12 20:19:17 -0800
committerSergey Dmitriev <serguei.n.dmitriev@intel.com>2019-11-15 08:10:17 -0800
commit840c891a8c248f1eb65981f492165b037e126652 (patch)
treedd06e36f7c821c94ded781c8b5567c3daf8953dc
parentc3607f52b1fd6fa1bbbcd34e8c593e56b721cf7a (diff)
downloadbcm5719-llvm-840c891a8c248f1eb65981f492165b037e126652.tar.gz
bcm5719-llvm-840c891a8c248f1eb65981f492165b037e126652.zip
[llvm-objcopy][NFC] Use generated object file in COFF/add-section.test
Updated LIT test from D70205 to use generated object file with extended relocation table. Differential Revision: https://reviews.llvm.org/D70269
-rw-r--r--llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-obj-xrelocs.yaml.gzbin0 -> 189601 bytes
-rw-r--r--llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-xrelocs.obj.gzbin88299 -> 0 bytes
-rw-r--r--llvm/test/tools/llvm-objcopy/COFF/add-section.test19
3 files changed, 6 insertions, 13 deletions
diff --git a/llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-obj-xrelocs.yaml.gz b/llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-obj-xrelocs.yaml.gz
new file mode 100644
index 00000000000..5ef0a7a9e77
--- /dev/null
+++ b/llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-obj-xrelocs.yaml.gz
Binary files differ
diff --git a/llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-xrelocs.obj.gz b/llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-xrelocs.obj.gz
deleted file mode 100644
index 9b3cf4ad0e0..00000000000
--- a/llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-xrelocs.obj.gz
+++ /dev/null
Binary files differ
diff --git a/llvm/test/tools/llvm-objcopy/COFF/add-section.test b/llvm/test/tools/llvm-objcopy/COFF/add-section.test
index e8492c2c653..a82756ef885 100644
--- a/llvm/test/tools/llvm-objcopy/COFF/add-section.test
+++ b/llvm/test/tools/llvm-objcopy/COFF/add-section.test
@@ -34,26 +34,19 @@
## Test that llvm-objcopy can add a section to an object with extended
## relocations.
-# RUN: %python %p/../Inputs/ungzip.py %p/Inputs/x86_64-xrelocs.obj.gz > %t.in.xrelocs.obj
-# RUN: llvm-objcopy --add-section=.test.section=%t.sec %t.in.xrelocs.obj %t1.xrelocs.obj
+# RUN: %python %p/../Inputs/ungzip.py %p/Inputs/x86_64-obj-xrelocs.yaml.gz > %t.xrelocs.yaml
+# RUN: yaml2obj %t.xrelocs.yaml > %t.xrelocs.obj
+# RUN: llvm-objcopy --add-section=.test.section=%t.sec %t.xrelocs.obj %t1.xrelocs.obj
# RUN: llvm-readobj --file-headers --sections --section-data %t1.xrelocs.obj | FileCheck %s --check-prefixes=CHECK-EXTENDED-RELOCS
-# CHECK-EXTENDED-RELOCS: SectionCount: 5
+# CHECK-EXTENDED-RELOCS: SectionCount: 2
# CHECK-EXTENDED-RELOCS: Name: .data
-# CHECK-EXTENDED-RELOCS-NEXT: VirtualSize:
-# CHECK-EXTENDED-RELOCS-NEXT: VirtualAddress:
-# CHECK-EXTENDED-RELOCS-NEXT: RawDataSize:
-# CHECK-EXTENDED-RELOCS-NEXT: PointerToRawData:
-# CHECK-EXTENDED-RELOCS-NEXT: PointerToRelocations:
-# CHECK-EXTENDED-RELOCS-NEXT: PointerToLineNumbers:
-# CHECK-EXTENDED-RELOCS-NEXT: RelocationCount: 65535
-# CHECK-EXTENDED-RELOCS-NEXT: LineNumberCount: 0
-# CHECK-EXTENDED-RELOCS-NEXT: Characteristics [
+# CHECK-EXTENDED-RELOCS: RelocationCount: 65535
+# CHECK-EXTENDED-RELOCS: Characteristics [
# CHECK-EXTENDED-RELOCS-NEXT: IMAGE_SCN_ALIGN_16BYTES
# CHECK-EXTENDED-RELOCS-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA
# CHECK-EXTENDED-RELOCS-NEXT: IMAGE_SCN_LNK_NRELOC_OVFL
# CHECK-EXTENDED-RELOCS-NEXT: IMAGE_SCN_MEM_READ
-# CHECK-EXTENDED-RELOCS-NEXT: IMAGE_SCN_MEM_WRITE
# CHECK-EXTENDED-RELOCS-NEXT: ]
# CHECK-EXTENDED-RELOCS: Name: .test.section
# CHECK-EXTENDED-RELOCS: Characteristics [
OpenPOWER on IntegriCloud