[lld] r320339 - Fix test to test what it intended to test.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 10 17:06:39 PST 2017
Author: rafael
Date: Sun Dec 10 17:06:39 2017
New Revision: 320339
URL: http://llvm.org/viewvc/llvm-project?rev=320339&view=rev
Log:
Fix test to test what it intended to test.
The test was added to test that we don't merge read only data
sections, but the sections in the test were rw.
Modified:
lld/trunk/test/ELF/icf9.s
Modified: lld/trunk/test/ELF/icf9.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/icf9.s?rev=320339&r1=320338&r2=320339&view=diff
==============================================================================
--- lld/trunk/test/ELF/icf9.s (original)
+++ lld/trunk/test/ELF/icf9.s Sun Dec 10 17:06:39 2017
@@ -3,18 +3,21 @@
### Make sure that we do not merge data.
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: ld.lld %t -o %t2 --icf=all --verbose | FileCheck %s
+# RUN: llvm-readelf -S -W %t2 | FileCheck --check-prefix=SEC %s
-# CHECK-NOT: selected .data.d1
-# CHECK-NOT: selected .data.d2
+# SEC: .rodata PROGBITS 0000000000200120 000120 000002 00 A 0 0 1
+
+# CHECK-NOT: selected .rodata.d1
+# CHECK-NOT: selected .rodata.d2
.globl _start, d1, d2
_start:
ret
-.section .data.f1, "a"
+.section .rodata.f1, "a"
d1:
.byte 1
-.section .data.f2, "a"
+.section .rodata.f2, "a"
d2:
.byte 1
More information about the llvm-commits
mailing list