[lld] r335818 - [ELF] - Get rid of precompiled elf object in test case.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 28 02:29:49 PDT 2018


Author: grimar
Date: Thu Jun 28 02:29:49 2018
New Revision: 335818

URL: http://llvm.org/viewvc/llvm-project?rev=335818&view=rev
Log:
[ELF] - Get rid of precompiled elf object in test case.

We has precompiled object with unsupported FDE version (=2).
It is possible to use llvm-mc instead for this test.

Patch do this change.

Removed:
    lld/trunk/test/ELF/invalid/Inputs/cie-version2.elf
Modified:
    lld/trunk/test/ELF/invalid/eh-frame-hdr-no-out.s

Removed: lld/trunk/test/ELF/invalid/Inputs/cie-version2.elf
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/Inputs/cie-version2.elf?rev=335817&view=auto
==============================================================================
Binary file - no diff available.

Modified: lld/trunk/test/ELF/invalid/eh-frame-hdr-no-out.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/invalid/eh-frame-hdr-no-out.s?rev=335818&r1=335817&r2=335818&view=diff
==============================================================================
--- lld/trunk/test/ELF/invalid/eh-frame-hdr-no-out.s (original)
+++ lld/trunk/test/ELF/invalid/eh-frame-hdr-no-out.s Thu Jun 28 02:29:49 2018
@@ -1,6 +1,19 @@
 // REQUIRES: x86
-// RUN: not ld.lld --eh-frame-hdr %p/Inputs/cie-version2.elf -o %t >& %t.log
-// RUN: FileCheck %s < %t.log
+// 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
 
-// cie-version2.elf contains unsupported version of CIE = 2.
-// CHECK: FDE version 1 or 3 expected, but got 2
+// CHECK: error: corrupted .eh_frame: FDE version 1 or 3 expected, but got 2
+
+.section .eh_frame
+  .byte 0x08
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00
+  .byte 0x02
+  .byte 0x00
+  .byte 0x00
+  .byte 0x00




More information about the llvm-commits mailing list