[PATCH] D30967: [ELF] Update tests to work even with modified defaults

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 20:34:43 PDT 2017


phosek updated this revision to Diff 91815.
phosek marked an inline comment as done.

Repository:
  rL LLVM

https://reviews.llvm.org/D30967

Files:
  test/ELF/merge-reloc.s
  test/ELF/no-merge.s


Index: test/ELF/no-merge.s
===================================================================
--- test/ELF/no-merge.s
+++ test/ELF/no-merge.s
@@ -1,19 +1,19 @@
 # REQUIRES: x86
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: echo "SECTIONS { .data : {*(.data.*)} }" > %t0.script
+# RUN: echo "SECTIONS { .rodata : {*(.rodata.*)} }" > %t0.script
 # RUN: ld.lld %t.o -o %t0.out --script %t0.script
 # RUN: llvm-objdump -s %t0.out | FileCheck %s
 
 # RUN: ld.lld -O0 %t.o -o %t1.out --script %t0.script
 # RUN: llvm-objdump -s %t1.out | FileCheck %s
-# CHECK:      Contents of section .data:
+# CHECK:      Contents of section .rodata:
 # CHECK-NEXT:   0000 01610003
 
-.section .data.aw,"aw", at progbits
+.section .rodata.a,"a", at progbits
 .byte 1
 
-.section .data.ams,"aMS", at progbits,1
+.section .rodata.ams,"aMS", at progbits,1
 .asciz "a"
 
-.section .data.am,"aM", at progbits,1
+.section .rodata.am,"aM", at progbits,1
 .byte 3
Index: test/ELF/merge-reloc.s
===================================================================
--- test/ELF/merge-reloc.s
+++ test/ELF/merge-reloc.s
@@ -10,7 +10,7 @@
 
 # CHECK:      Section {
 # CHECK:        Index:
-# CHECK:        Name: .data
+# CHECK:        Name: .rodata
 # CHECK-NEXT:   Type: SHT_PROGBITS
 # CHECK-NEXT:   Flags [
 # CHECK-NEXT:     SHF_ALLOC
@@ -29,7 +29,7 @@
 # CHECK-NEXT: }
 # CHECK:      Section {
 # CHECK:        Index:
-# CHECK:        Name: .data
+# CHECK:        Name: .rodata
 # CHECK-NEXT:   Type: SHT_PROGBITS
 # CHECK-NEXT:   Flags [
 # CHECK-NEXT:     SHF_ALLOC
@@ -48,11 +48,10 @@
 # CHECK-NEXT: }
 # CHECK:      Section {
 # CHECK:        Index:
-# CHECK:        Name: .data
+# CHECK:        Name: .rodata
 # CHECK-NEXT:   Type: SHT_PROGBITS
 # CHECK-NEXT:   Flags [
 # CHECK-NEXT:     SHF_ALLOC
-# CHECK-NEXT:     SHF_WRITE
 # CHECK-NEXT:   ]
 # CHECK-NEXT:   Address:
 # CHECK-NEXT:   Offset:
@@ -66,24 +65,24 @@
 # CHECK-NEXT:   )
 # CHECK-NEXT: }
 
-        .section        .data.1,"aM", at progbits,4
+        .section        .rodata.1,"aM", at progbits,4
         .align  4
         .global foo
 foo:
         .long   0x42
         .long   0x42
         .long   0x42
 
-        .section        .data.2,"aM", at progbits,8
+        .section        .rodata.2,"aM", at progbits,8
         .align  8
         .global bar
 bar:
         .long   0x42
         .long   0x42
         .long   0x42
         .long   0x42
 
-        .data
+        .rodata
         .global gar
 zed:
         .long   0x42


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30967.91815.patch
Type: text/x-patch
Size: 2484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170315/4bee9a59/attachment.bin>


More information about the llvm-commits mailing list