ld: Add a test for PR ld/27259

PR ld/27259
	* testsuite/ld-elf/pr27259.d: New file.
	* testsuite/ld-elf/pr27259.s: Likewise.
This commit is contained in:
H.J. Lu
2021-01-28 05:36:51 -08:00
parent a7ad3cb1ff
commit 53e556e5b4
3 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2021-01-28 H.J. Lu <hongjiu.lu@intel.com>
PR ld/27259
* testsuite/ld-elf/pr27259.d: New file.
* testsuite/ld-elf/pr27259.s: Likewise.
2021-01-28 Alan Modra <amodra@gmail.com>
PR 27259

View File

@ -0,0 +1,7 @@
#ld: --gc-sections -e _start
#target: [check_gc_sections_available]
#readelf: -SW
#...
+\[ *[0-9]+\] \.stack_sizes +PROGBITS +0+ +[0-9a-f]+ 0+1 +00 +L +[0-9] .*
#pass

View File

@ -0,0 +1,14 @@
.section .stack_sizes,"o",%progbits,live,unique,0
live:
.byte 1
.section .stack_sizes,"o",%progbits,dead,unique,1
dead:
.byte 2
.section .text.main,"ax",%progbits
.globl _start
_start:
.byte 0
.section .note,"",%note
.dc.a live