1 ## This test checks that if a section has a sh_link field, and one or more
2 ## sections are removed such that the target section index changes, then
3 ## llvm-objcopy correctly updates the sh_link field.
5 # RUN: yaml2obj %s -o %t.o
6 # RUN: llvm-objcopy --remove-section .foo %t.o %t2.o
7 # RUN: llvm-readobj --section-headers %t2.o | FileCheck %s
25 # CHECK-NEXT: Name: .bar
27 ## Find the next "Link" line, then check the value is exactly the index of .bar.
29 # CHECK-SAME: : 1{{$}}