diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-01-28 05:36:51 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-01-28 05:40:07 -0800 |
commit | 53e556e5b45e3d8fda25be3623883a0952c0c716 (patch) | |
tree | 52b53a92f609e0368e9db8de6c0f905f04370f81 /ld | |
parent | a7ad3cb1fff75e8e11df40128adda66a42a06239 (diff) | |
download | gdb-53e556e5b45e3d8fda25be3623883a0952c0c716.zip gdb-53e556e5b45e3d8fda25be3623883a0952c0c716.tar.gz gdb-53e556e5b45e3d8fda25be3623883a0952c0c716.tar.bz2 |
ld: Add a test for PR ld/27259
PR ld/27259
* testsuite/ld-elf/pr27259.d: New file.
* testsuite/ld-elf/pr27259.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr27259.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr27259.s | 14 |
3 files changed, 27 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 9dfff4a..6d47b7b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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 diff --git a/ld/testsuite/ld-elf/pr27259.d b/ld/testsuite/ld-elf/pr27259.d new file mode 100644 index 0000000..1cb6a87 --- /dev/null +++ b/ld/testsuite/ld-elf/pr27259.d @@ -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 diff --git a/ld/testsuite/ld-elf/pr27259.s b/ld/testsuite/ld-elf/pr27259.s new file mode 100644 index 0000000..a7c42d8 --- /dev/null +++ b/ld/testsuite/ld-elf/pr27259.s @@ -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 |