From 1a8898d97107cec9dd25149e8b6d2d4f7c7cbcb8 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Fri, 2 Aug 2019 18:22:46 +0000 Subject: [PATCH] [llvm-objcopy] - Fix the strip-dwo-groups.test. It was reported (https://reviews.llvm.org/D65273#1612246) that this test fails if the compilation directory contain a "debug_" substring. This should fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367702 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../llvm-objcopy/ELF/strip-dwo-groups.test | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/test/tools/llvm-objcopy/ELF/strip-dwo-groups.test b/test/tools/llvm-objcopy/ELF/strip-dwo-groups.test index fe1770d4b31..eed3100933c 100644 --- a/test/tools/llvm-objcopy/ELF/strip-dwo-groups.test +++ b/test/tools/llvm-objcopy/ELF/strip-dwo-groups.test @@ -1,22 +1,27 @@ # RUN: yaml2obj %s -o %t # RUN: llvm-objcopy --strip-dwo %t -# RUN: llvm-readobj --symbols -S --elf-section-groups %t | FileCheck %s --implicit-check-not=debug_ +# RUN: llvm-readobj --symbols -S --elf-section-groups %t | FileCheck %s ## `llvm-objcopy --strip-dwo` strips out dwo sections, as a result, the index of ## the symbol table, the indices of the symbols and the indices of the sections ## which go after the removed ones will change. Consequently, the fields ## Link, Info and the content of .group need to be updated. +# CHECK-NOT: .debug_ + # CHECK: Groups { -# CHECK: Name: .group (1) -# CHECK-NEXT: Index: 1{{$}} -# CHECK-NEXT: Link: 6 -# CHECK-NEXT: Info: 2 -# CHECK-NEXT: Type: COMDAT (0x1) -# CHECK-NEXT: Signature: group1 -# CHECK-NEXT: Section(s) in group [ -# CHECK-NEXT: .text.group1 (3) -# CHECK-NEXT: ] +# CHECK-NEXT: Group { +# CHECK-NEXT: Name: .group (1) +# CHECK-NEXT: Index: 1{{$}} +# CHECK-NEXT: Link: 6 +# CHECK-NEXT: Info: 2 +# CHECK-NEXT: Type: COMDAT (0x1) +# CHECK-NEXT: Signature: group1 +# CHECK-NEXT: Section(s) in group [ +# CHECK-NEXT: .text.group1 (3) +# CHECK-NEXT: ] + +# CHECK-NOT: .debug_ # CHECK: Name: .group (1) # CHECK-NEXT: Index: 2{{$}} @@ -29,6 +34,8 @@ # CHECK-NEXT: .rela.text.group2 (5) # CHECK-NEXT: ] +# CHECK-NOT: .debug_ + --- !ELF FileHeader: Class: ELFCLASS64 -- 2.40.0