mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
PR23648 testcase
PR 23648 * testsuite/ld-elf/pr23648.d, * testsuite/ld-elf/pr23648.s, * testsuite/ld-elf/pr23648.t: New test.
This commit is contained in:
@ -4,6 +4,9 @@
|
|||||||
* ldlang.c (lang_process): Move lang_do_memory_regions earlier.
|
* ldlang.c (lang_process): Move lang_do_memory_regions earlier.
|
||||||
Comment on lang_do_assignments call.
|
Comment on lang_do_assignments call.
|
||||||
* ldgram.y (origin_exp): Don't assign region->current.
|
* ldgram.y (origin_exp): Don't assign region->current.
|
||||||
|
* testsuite/ld-elf/pr23648.d,
|
||||||
|
* testsuite/ld-elf/pr23648.s,
|
||||||
|
* testsuite/ld-elf/pr23648.t: New test.
|
||||||
|
|
||||||
2018-09-19 Alan Modra <amodra@gmail.com>
|
2018-09-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
9
ld/testsuite/ld-elf/pr23648.d
Normal file
9
ld/testsuite/ld-elf/pr23648.d
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#ld: --gc-sections -T pr23648.t
|
||||||
|
#target: [check_gc_sections_available]
|
||||||
|
#xfail: frv-*-linux* lm32-*-linux*
|
||||||
|
#nm: -B
|
||||||
|
|
||||||
|
#failif
|
||||||
|
#...
|
||||||
|
.*test0
|
||||||
|
#...
|
15
ld/testsuite/ld-elf/pr23648.s
Normal file
15
ld/testsuite/ld-elf/pr23648.s
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.text
|
||||||
|
.global entry, _entry
|
||||||
|
entry:
|
||||||
|
_entry:
|
||||||
|
.dc.a foo
|
||||||
|
|
||||||
|
.section .text.test0,"ax",%progbits
|
||||||
|
.global test0
|
||||||
|
test0:
|
||||||
|
.dc.a 0
|
||||||
|
|
||||||
|
.section .text.test1,"ax",%progbits
|
||||||
|
.global test1
|
||||||
|
test1:
|
||||||
|
.dc.a 1
|
10
ld/testsuite/ld-elf/pr23648.t
Normal file
10
ld/testsuite/ld-elf/pr23648.t
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
MEMORY { code : ORIGIN = 0, LENGTH = 8M }
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
ENTRY (entry)
|
||||||
|
.text 1M : { *(.text*) } >code
|
||||||
|
/DISCARD/ : { *(*) }
|
||||||
|
}
|
||||||
|
|
||||||
|
foo = LENGTH (code) != 8M ? test0 : test1;
|
Reference in New Issue
Block a user