From 72ae258de0c9e8eace08d80125146d0e5e86ba38 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Tue, 15 Jan 2019 09:34:45 +0000 Subject: [PATCH] [llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351173 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../llvm-objcopy/COFF/strip-reloc-symbol.test | 8 +-- test/tools/llvm-objcopy/COFF/strip-symbol.test | 64 +++++++++++----------- 2 files changed, 36 insertions(+), 36 deletions(-) rewrite test/tools/llvm-objcopy/COFF/strip-symbol.test (99%) diff --git a/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test b/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test index 0ccc87cbde6..ba1dfb00efd 100644 --- a/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test +++ b/test/tools/llvm-objcopy/COFF/strip-reloc-symbol.test @@ -1,5 +1,5 @@ -# RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.o -# RUN: not llvm-objcopy -N foo %t.o 2>&1 | FileCheck %s --check-prefix=ERROR -# RUN: not llvm-objcopy --strip-symbol foo %t.o 2>&1 | FileCheck %s --check-prefix=ERROR +RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.o +RUN: not llvm-objcopy -N foo %t.o 2>&1 | FileCheck %s --check-prefix=ERROR +RUN: not llvm-objcopy --strip-symbol foo %t.o 2>&1 | FileCheck %s --check-prefix=ERROR -# ERROR: error: '{{.*}}{{/|\\}}strip-reloc-symbol.test.tmp.o': not stripping symbol 'foo' because it is named in a relocation. +ERROR: error: '{{.*}}{{/|\\}}strip-reloc-symbol.test.tmp.o': not stripping symbol 'foo' because it is named in a relocation. diff --git a/test/tools/llvm-objcopy/COFF/strip-symbol.test b/test/tools/llvm-objcopy/COFF/strip-symbol.test dissimilarity index 99% index 5355b22328a..268b097255d 100644 --- a/test/tools/llvm-objcopy/COFF/strip-symbol.test +++ b/test/tools/llvm-objcopy/COFF/strip-symbol.test @@ -1,32 +1,32 @@ -# RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.in.o - -# RUN: llvm-readobj -relocations %t.in.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-PRE -# RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE - -# RUN: llvm-objcopy -N mainfunc %t.in.o %t.out.o -# RUN: llvm-readobj -relocations %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST -# RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS - -# RUN: llvm-objcopy --strip-symbol mainfunc %t.in.o %t.out.o -# RUN: llvm-readobj -relocations %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST -# RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS - -# Explicitly listing the relocations for the input as well, to show -# that the symbol index of the symbol foo is updated in the relocations, -# while keeping relocations to two distinct .rdata symbols separate. - -# RELOCS: Relocations [ -# RELOCS-NEXT: Section (1) .text { -# RELOCS-NEXT: 0x3 IMAGE_REL_AMD64_REL32 .rdata (0) -# RELOCS-NEXT: 0xA IMAGE_REL_AMD64_REL32 .rdata (1) -# RELOCS-PRE-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (3) -# RELOCS-POST-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (2) -# RELOCS-NEXT: } -# RELOCS-NEXT: ] - -# SYMBOLS: SYMBOL TABLE: -# SYMBOLS-NEXT: .rdata -# SYMBOLS-NEXT: .rdata -# SYMBOLS-PRE-NEXT: mainfunc -# SYMBOLS-NEXT: foo -# SYMBOLS-EMPTY: +RUN: yaml2obj %p/Inputs/strip-symbols.yaml > %t.in.o + +RUN: llvm-readobj -relocations %t.in.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-PRE +RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-PRE + +RUN: llvm-objcopy -N mainfunc %t.in.o %t.out.o +RUN: llvm-readobj -relocations %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST +RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS + +RUN: llvm-objcopy --strip-symbol mainfunc %t.in.o %t.out.o +RUN: llvm-readobj -relocations %t.out.o | FileCheck %s --check-prefixes=RELOCS,RELOCS-POST +RUN: llvm-objdump -t %t.out.o | FileCheck %s --check-prefix=SYMBOLS + +Explicitly listing the relocations for the input as well, to show +that the symbol index of the symbol foo is updated in the relocations, +while keeping relocations to two distinct .rdata symbols separate. + +RELOCS: Relocations [ +RELOCS-NEXT: Section (1) .text { +RELOCS-NEXT: 0x3 IMAGE_REL_AMD64_REL32 .rdata (0) +RELOCS-NEXT: 0xA IMAGE_REL_AMD64_REL32 .rdata (1) +RELOCS-PRE-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (3) +RELOCS-POST-NEXT: 0x11 IMAGE_REL_AMD64_REL32 foo (2) +RELOCS-NEXT: } +RELOCS-NEXT: ] + +SYMBOLS: SYMBOL TABLE: +SYMBOLS-NEXT: .rdata +SYMBOLS-NEXT: .rdata +SYMBOLS-PRE-NEXT: mainfunc +SYMBOLS-NEXT: foo +SYMBOLS-EMPTY: -- 2.11.4.GIT