diff options
author | George Rimar <grimar@accesssoftek.com> | 2018-06-28 12:46:56 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2018-06-28 12:46:56 +0000 |
commit | 805583e6a6c21bd7bb9e84fe2c7d7280e9af77cb (patch) | |
tree | 1d0ca5b627c58315fe4e6189743e736210c0942e | |
parent | 02c70438f80d05375e4d8f92e794393db843e851 (diff) | |
download | bcm5719-llvm-805583e6a6c21bd7bb9e84fe2c7d7280e9af77cb.tar.gz bcm5719-llvm-805583e6a6c21bd7bb9e84fe2c7d7280e9af77cb.zip |
[ELF] - EhFrame.cpp: add test case to cover "DW_EH_PE_aligned encoding is not supported" error.
It is https://github.com/llvm-mirror/lld/blob/master/ELF/EhFrame.cpp#L144,
and we had no test case to cover it.
llvm-svn: 335849
-rw-r--r-- | lld/test/ELF/invalid-eh-frame7.s | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lld/test/ELF/invalid-eh-frame7.s b/lld/test/ELF/invalid-eh-frame7.s new file mode 100644 index 00000000000..03dd9dfa906 --- /dev/null +++ b/lld/test/ELF/invalid-eh-frame7.s @@ -0,0 +1,30 @@ +# 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: DW_EH_PE_aligned encoding is not supported + +.section .eh_frame + .byte 0x0E + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x00 + .byte 0x01 + + .byte 0x50 # Augmentation string: 'P','\0' + .byte 0x00 + + .byte 0x01 + + .byte 0x01 # LEB128 + .byte 0x01 # LEB128 + + .byte 0x51 + .byte 0x01 + .byte 0x01 + .byte 0x01 |