OSDN Git Service

[llvm-objcopy] Update remove-section.test
authorAlexander Shaposhnikov <shal1t712@gmail.com>
Fri, 11 May 2018 04:30:57 +0000 (04:30 +0000)
committerAlexander Shaposhnikov <shal1t712@gmail.com>
Fri, 11 May 2018 04:30:57 +0000 (04:30 +0000)
Verify that the input binary is not getting modified
and add an invocation which uses -remove-section instead of -R.

Test plan: make check-all

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332078 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-objcopy/remove-section.test

index 1d7a544..f19e7b7 100644 (file)
@@ -1,7 +1,16 @@
 # RUN: yaml2obj %s > %t
+# RUN: cp %t %t1
+
 # RUN: llvm-objcopy -R .test2 %t %t2
 # RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s
 
+# Verify that the first run of llvm-objcopy
+# has not modified the input binary.
+# RUN: cmp %t %t1
+
+# RUN: llvm-objcopy -remove-section=.test2 %t1 %t3
+# RUN: cmp %t2 %t3
+
 !ELF
 FileHeader:
   Class:           ELFCLASS64