From: Alexander Shaposhnikov Date: Fri, 11 May 2018 04:30:57 +0000 (+0000) Subject: [llvm-objcopy] Update remove-section.test X-Git-Tag: android-x86-7.1-r4~1224 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f3684c59a8a2fccf32a3c704faccb924a2a9b630;p=android-x86%2Fexternal-llvm.git [llvm-objcopy] Update remove-section.test 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 --- diff --git a/test/tools/llvm-objcopy/remove-section.test b/test/tools/llvm-objcopy/remove-section.test index 1d7a54417f2..f19e7b7684e 100644 --- a/test/tools/llvm-objcopy/remove-section.test +++ b/test/tools/llvm-objcopy/remove-section.test @@ -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