Skip to content

Commit d6d640e

Browse files
committed
[ELF][test] Fix section sh_type and sh_flags
A future MC change may add a warning/error when a .section directive specifies incorrect sh_flags/sh_type.
1 parent e253cdd commit d6d640e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+49
-52
lines changed

lld/test/ELF/Inputs/eh-frame-end.s

Lines changed: 0 additions & 2 deletions
This file was deleted.

lld/test/ELF/Inputs/eh-frame-pcrel-overflow.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
foo:
44
ret
55

6-
.section .eh_frame, "a"
6+
.section .eh_frame,"a",@unwind
77
.long 12 # Size
88
.long 0x00 # ID
99
.byte 0x01 # Version.

lld/test/ELF/Inputs/mips-nonalloc.s

Lines changed: 0 additions & 2 deletions
This file was deleted.

lld/test/ELF/Inputs/ppc64-sort-small-cm-relocs-input4.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ getRodata:
1010
lwa 3, .LC0@toc(2)
1111
blr
1212

13-
.section .rodata,"aMS",@progbits,8
13+
.section .rodata,"a",@progbits
1414
.quad _start
1515

1616
.section .toc,"aw",@progbits

lld/test/ELF/comdat-discarded-reloc.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ bar:
3232
.quad .text.bar1
3333

3434
## Don't warn on .eh_frame, .debug*, .zdebug*, or .gcc_except_table
35-
.section .eh_frame,"a"
35+
.section .eh_frame,"a",@unwind
3636
.quad .text.bar1
3737

3838
.section .debug_foo

lld/test/ELF/compress-debug-sections-reloc.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
a_sym:
1818
nop
1919

20-
.section .debug_str,"",@progbits
20+
.section .debug_str,"MS",@progbits,1
2121
.long a_sym
2222
.long a_debug_sym
2323

lld/test/ELF/eh-frame-begin-end.s

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// REQUIRES: x86
22
// RUN: llvm-mc -filetype=obj -triple=amd64-unknown-openbsd %s -o %t.o
3-
// RUN: llvm-mc -filetype=obj -triple=amd64-unknown-openbsd %p/Inputs/eh-frame-end.s -o %t2.o
3+
// RUN: echo '.section .eh_frame,"a",@unwind; .long 0' | \
4+
// RUN: llvm-mc -filetype=obj -triple=amd64-unknown-openbsd - -o %t2.o
45
// RUN: ld.lld %t.o %t2.o -o %t
56
// RUN: llvm-readobj --sections %t | FileCheck %s
67

@@ -13,5 +14,5 @@
1314
// CHECK-NEXT: Offset: 0x120
1415
// CHECK-NEXT: Size: 4
1516

16-
.section ".eh_frame", "a", @progbits
17+
.section .eh_frame,"a",@unwind
1718
__EH_FRAME_BEGIN__:

lld/test/ELF/eh-frame-marker.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
// CHECK: Name: foo
1616
// CHECK-NEXT: Value: [[ADDR]]
1717

18-
.section .eh_frame
18+
.section .eh_frame,"a",@unwind
1919
foo:
2020
.long 0

lld/test/ELF/eh-frame-negative-pcrel-sdata2.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
_start:
5858
nop
5959

60-
.section .eh_frame, "a"
60+
.section .eh_frame,"a",@unwind
6161
.long 16 # Size
6262
.long 0x00 # ID
6363
.byte 0x01 # Version.

lld/test/ELF/eh-frame-negative-pcrel-sdata4.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
_start:
5858
nop
5959

60-
.section .eh_frame, "a"
60+
.section .eh_frame,"a",@unwind
6161
.long 16 # Size
6262
.long 0x00 # ID
6363
.byte 0x01 # Version.

0 commit comments

Comments
 (0)