Skip to content

Commit

Permalink
[llvm-objcopy] - Fix the strip-dwo-groups.test.
Browse files Browse the repository at this point in the history
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.

llvm-svn: 367702
  • Loading branch information
George Rimar committed Aug 2, 2019
1 parent c5d4014 commit 5249907
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions llvm/test/tools/llvm-objcopy/ELF/strip-dwo-groups.test
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5249907

Please sign in to comment.