Skip to content

Commit 3b4e29b

Browse files
committed
[ELF] Update tests to work even with modified defaults
D30229 changes the defaults based on section names to match the GAS behavior, which breaks some of the tests that rely on the old defaults. Differential Revision: https://reviews.llvm.org/D30967 llvm-svn: 297803
1 parent 02ad516 commit 3b4e29b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lld/test/ELF/merge-reloc.s

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# CHECK: Section {
1212
# CHECK: Index:
13-
# CHECK: Name: .data
13+
# CHECK: Name: .rodata
1414
# CHECK-NEXT: Type: SHT_PROGBITS
1515
# CHECK-NEXT: Flags [
1616
# CHECK-NEXT: SHF_ALLOC
@@ -29,7 +29,7 @@
2929
# CHECK-NEXT: }
3030
# CHECK: Section {
3131
# CHECK: Index:
32-
# CHECK: Name: .data
32+
# CHECK: Name: .rodata
3333
# CHECK-NEXT: Type: SHT_PROGBITS
3434
# CHECK-NEXT: Flags [
3535
# CHECK-NEXT: SHF_ALLOC
@@ -66,15 +66,15 @@
6666
# CHECK-NEXT: )
6767
# CHECK-NEXT: }
6868

69-
.section .data.1,"aM",@progbits,4
69+
.section .rodata.1,"aM",@progbits,4
7070
.align 4
7171
.global foo
7272
foo:
7373
.long 0x42
7474
.long 0x42
7575
.long 0x42
7676

77-
.section .data.2,"aM",@progbits,8
77+
.section .rodata.2,"aM",@progbits,8
7878
.align 8
7979
.global bar
8080
bar:

lld/test/ELF/no-merge.s

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# REQUIRES: x86
22
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3-
# RUN: echo "SECTIONS { .data : {*(.data.*)} }" > %t0.script
3+
# RUN: echo "SECTIONS { .rodata : {*(.rodata.*)} }" > %t0.script
44
# RUN: ld.lld %t.o -o %t0.out --script %t0.script
55
# RUN: llvm-objdump -s %t0.out | FileCheck %s
66

77
# RUN: ld.lld -O0 %t.o -o %t1.out --script %t0.script
88
# RUN: llvm-objdump -s %t1.out | FileCheck %s
9-
# CHECK: Contents of section .data:
9+
# CHECK: Contents of section .rodata:
1010
# CHECK-NEXT: 0000 01610003
1111

12-
.section .data.aw,"aw",@progbits
12+
.section .rodata.a,"a",@progbits
1313
.byte 1
1414

15-
.section .data.ams,"aMS",@progbits,1
15+
.section .rodata.ams,"aMS",@progbits,1
1616
.asciz "a"
1717

18-
.section .data.am,"aM",@progbits,1
18+
.section .rodata.am,"aM",@progbits,1
1919
.byte 3

0 commit comments

Comments
 (0)