[PATCH] D76409: [ELF][test] Improve arm-exidx-output.s to test different output text sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 22:47:17 PDT 2020


MaskRay created this revision.
Herald added subscribers: llvm-commits, kristof.beyls, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76409

Files:
  lld/test/ELF/arm-exidx-output.s


Index: lld/test/ELF/arm-exidx-output.s
===================================================================
--- lld/test/ELF/arm-exidx-output.s
+++ lld/test/ELF/arm-exidx-output.s
@@ -1,7 +1,11 @@
 // REQUIRES: arm
-// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
-// RUN: ld.lld %t -o %t2
-// RUN: llvm-readobj --sections %t2 | FileCheck %s
+// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
+// RUN: ld.lld %t.o -o %t
+// RUN: llvm-readobj --sections %t | FileCheck %s
+
+// RUN: echo 'SECTIONS { .text.f1 : { *(.text.f1) } .text.f2 : { *(.text.f2) } }' > %t.lds
+// RUN: ld.lld -T %t.lds %t.o -o %t1
+// RUN: llvm-readobj --sections %t1 | FileCheck %s
 
 // Check that only a single .ARM.exidx output section is created when
 // there are input sections of the form .ARM.exidx.<section-name>. The
@@ -40,5 +44,4 @@
 // CHECK-NEXT:      SHF_LINK_ORDER
 // CHECK-NEXT:    ]
 
-// CHECK-NOT:     Name: .ARM.exidx.text.f1
-// CHECK-NOT:     Name: .ARM.exidx.text.f2
+// CHECK-NOT:     Name: .ARM.exidx


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76409.251275.patch
Type: text/x-patch
Size: 1050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200319/488ed598/attachment.bin>


More information about the llvm-commits mailing list