[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
This commit is contained in:
George Rimar 2018-06-28 13:46:49 +00:00
parent 456ee30036
commit e666545a71
1 changed files with 15 additions and 0 deletions

View File

@ -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