[PATCH] D70269: [llvm-objcopy][NFC] Use generated object file in COFF/add-section.test

Sergey Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 13:20:29 PST 2019


sdmitriev created this revision.
sdmitriev added reviewers: jhenderson, MaskRay, mstorsjo.
Herald added subscribers: llvm-commits, seiya, abrachet, jakehehrlich.
Herald added a reviewer: alexshap.
Herald added a reviewer: rupprecht.
Herald added a project: LLVM.

Updated LIT test from D70205 <https://reviews.llvm.org/D70205> to use generated object file with extended relocation table.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70269

Files:
  llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-obj-xrelocs.yaml.gz
  llvm/test/tools/llvm-objcopy/COFF/Inputs/x86_64-xrelocs.obj.gz
  llvm/test/tools/llvm-objcopy/COFF/add-section.test


Index: llvm/test/tools/llvm-objcopy/COFF/add-section.test
===================================================================
--- llvm/test/tools/llvm-objcopy/COFF/add-section.test
+++ 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 [


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70269.229390.patch
Type: text/x-patch
Size: 1994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191114/f3ebd88c/attachment.bin>


More information about the llvm-commits mailing list