summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/symtab-error-on-remove-strtab.test
diff options
context:
space:
mode:
authorJake Ehrlich <jakehehrlich@google.com>2017-10-10 18:47:09 +0000
committerJake Ehrlich <jakehehrlich@google.com>2017-10-10 18:47:09 +0000
commit36a2eb34ed394b7277df6ef9b935bfe2be3402b8 (patch)
tree876ae8d0fd21d2494acbb401953c66431e5e7a64 /llvm/test/tools/llvm-objcopy/symtab-error-on-remove-strtab.test
parentc5ff72708d232079e1c2099165584cf8d03e1c7e (diff)
downloadbcm5719-llvm-36a2eb34ed394b7277df6ef9b935bfe2be3402b8.tar.gz
bcm5719-llvm-36a2eb34ed394b7277df6ef9b935bfe2be3402b8.zip
[llvm-objcopy] Add support for removing sections
This change adds support for removing sections using the -R field (as GNU objcopy does as well). This change should let us add many helpful tests and is a proper stepping stone for adding more general kinds of stripping. Differential Revision: https://reviews.llvm.org/D38260 llvm-svn: 315346
Diffstat (limited to 'llvm/test/tools/llvm-objcopy/symtab-error-on-remove-strtab.test')
-rw-r--r--llvm/test/tools/llvm-objcopy/symtab-error-on-remove-strtab.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objcopy/symtab-error-on-remove-strtab.test b/llvm/test/tools/llvm-objcopy/symtab-error-on-remove-strtab.test
new file mode 100644
index 00000000000..d9603996d7f
--- /dev/null
+++ b/llvm/test/tools/llvm-objcopy/symtab-error-on-remove-strtab.test
@@ -0,0 +1,11 @@
+# RUN: yaml2obj %s > %t
+# RUN: not llvm-objcopy -R .strtab %t %t2 2>&1 >/dev/null | FileCheck %s
+
+!ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_X86_64
+
+# CHECK: String table .strtab cannot be removed because it is referenced by the symbol table .symtab
OpenPOWER on IntegriCloud