summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-06-28 13:46:49 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-06-28 13:46:49 +0000
commite666545a71aa522dfe4960f3f365d567501ad905 (patch)
treed2ad59d6799519d8ddc559f24016a676d31a4155
parent456ee300364f4eb3337b679866bf4d84051c4556 (diff)
downloadbcm5719-llvm-e666545a71aa522dfe4960f3f365d567501ad905.tar.gz
bcm5719-llvm-e666545a71aa522dfe4960f3f365d567501ad905.zip
[ELF] - EhFrame.cpp: add test case to check "CIE is too small" error message.
The following line of code was untested: https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L94 Patch adds a test case. llvm-svn: 335855
-rw-r--r--lld/test/ELF/invalid-eh-frame9.s15
1 files changed, 15 insertions, 0 deletions
diff --git a/lld/test/ELF/invalid-eh-frame9.s b/lld/test/ELF/invalid-eh-frame9.s
new file mode 100644
index 00000000000..8bc1b4caadd
--- /dev/null
+++ b/lld/test/ELF/invalid-eh-frame9.s
@@ -0,0 +1,15 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
+# RUN: not ld.lld --eh-frame-hdr %t -o %t2 2>&1 | FileCheck %s
+
+# CHECK: error: corrupted .eh_frame: CIE is too small
+
+.section .eh_frame
+ .byte 0x03
+ .byte 0x00
+ .byte 0x00
+ .byte 0x00
+ .byte 0x00
+ .byte 0x00
+ .byte 0x00
OpenPOWER on IntegriCloud