[lld] r314433 - Add a test.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 10:15:02 PDT 2017


Author: rafael
Date: Thu Sep 28 10:15:02 2017
New Revision: 314433

URL: http://llvm.org/viewvc/llvm-project?rev=314433&view=rev
Log:
Add a test.

This would have found the issues with r313697.

The problem was that that commit mixed the content of different
.eh_frame sections. Unfortunately we had no tests looking inside the
fdes.

Added:
    lld/trunk/test/ELF/Inputs/eh-frame.s
    lld/trunk/test/ELF/eh-frame.s

Added: lld/trunk/test/ELF/Inputs/eh-frame.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/eh-frame.s?rev=314433&view=auto
==============================================================================
--- lld/trunk/test/ELF/Inputs/eh-frame.s (added)
+++ lld/trunk/test/ELF/Inputs/eh-frame.s Thu Sep 28 10:15:02 2017
@@ -0,0 +1,3 @@
+.cfi_startproc
+.cfi_def_cfa_offset 32
+.cfi_endproc

Added: lld/trunk/test/ELF/eh-frame.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/eh-frame.s?rev=314433&view=auto
==============================================================================
--- lld/trunk/test/ELF/eh-frame.s (added)
+++ lld/trunk/test/ELF/eh-frame.s Thu Sep 28 10:15:02 2017
@@ -0,0 +1,12 @@
+// REQUIRES: x86
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/eh-frame.s -o %t2.o
+// RUN: ld.lld %t1.o %t2.o -o %t
+// RUN: llvm-dwarfdump -eh-frame %t | FileCheck %s
+
+// CHECK:   DW_CFA_def_cfa_offset: +64
+// CHECK:   DW_CFA_def_cfa_offset: +32
+
+.cfi_startproc
+.cfi_def_cfa_offset 64
+.cfi_endproc




More information about the llvm-commits mailing list