[lld] r267884 - Add a test showing that we can gc parts of .eh_frame.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 07:31:09 PDT 2016


Author: rafael
Date: Thu Apr 28 09:31:09 2016
New Revision: 267884

URL: http://llvm.org/viewvc/llvm-project?rev=267884&view=rev
Log:
Add a test showing that we can gc parts of .eh_frame.

Modified:
    lld/trunk/test/ELF/gc-sections-eh.s

Modified: lld/trunk/test/ELF/gc-sections-eh.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gc-sections-eh.s?rev=267884&r1=267883&r2=267884&view=diff
==============================================================================
--- lld/trunk/test/ELF/gc-sections-eh.s (original)
+++ lld/trunk/test/ELF/gc-sections-eh.s Thu Apr 28 09:31:09 2016
@@ -1,10 +1,23 @@
 # REQUIRES: x86
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
+
 # RUN: ld.lld %t -o %t2 --gc-sections
 # RUN: llvm-readobj -t %t2 | FileCheck %s
+# RUN: llvm-objdump --dwarf=frames %t2 | FileCheck --check-prefix=EH %s
+
+# RUN: ld.lld %t -o %t3
+# RUN: llvm-readobj -t %t3 | FileCheck --check-prefix=NOGC %s
+# RUN: llvm-objdump --dwarf=frames %t3 | FileCheck --check-prefix=EHNOGC %s
 
 # CHECK-NOT: foo
+# NOGC:      foo
+
+# EH:     FDE cie={{.*}} pc=
+# EH-NOT: FDE
+
+# EHNOGC: FDE cie={{.*}} pc=
+# EHNOGC: FDE cie={{.*}} pc=
 
 	.section	.text,"ax", at progbits,unique,0
 	.globl	foo




More information about the llvm-commits mailing list