forked from Imagelibrary/binutils-gdb
ASSERT in empty output section with address
* ldlang.c (lang_do_assignments_1): Correct "dot" inside ignored sections. * testsuite/ld-scripts/empty-address-4.d, * testsuite/ld-scripts/empty-address-4.s, * testsuite/ld-scripts/empty-address-4.t: New test. * testsuite/ld-scripts/empty-address.exp: Run it.
This commit is contained in:
6
ld/testsuite/ld-scripts/empty-address-4.d
Normal file
6
ld/testsuite/ld-scripts/empty-address-4.d
Normal file
@@ -0,0 +1,6 @@
|
||||
#ld: -T empty-address-4.t
|
||||
#nm: -n
|
||||
|
||||
#...
|
||||
0+0 [AT] _start
|
||||
#pass
|
||||
4
ld/testsuite/ld-scripts/empty-address-4.s
Normal file
4
ld/testsuite/ld-scripts/empty-address-4.s
Normal file
@@ -0,0 +1,4 @@
|
||||
.text
|
||||
.global _start
|
||||
_start:
|
||||
.dc.a 0, 0
|
||||
11
ld/testsuite/ld-scripts/empty-address-4.t
Normal file
11
ld/testsuite/ld-scripts/empty-address-4.t
Normal file
@@ -0,0 +1,11 @@
|
||||
SECTIONS
|
||||
{
|
||||
.text 0: { *(.text .pr) }
|
||||
.data 0x200:
|
||||
{
|
||||
*(.data)
|
||||
ASSERT (. < 0x400, oops);
|
||||
}
|
||||
.bss : { *(.bss) }
|
||||
/DISCARD/ : { *(.*) }
|
||||
}
|
||||
@@ -32,5 +32,6 @@ run_dump_test empty-address-2b
|
||||
run_dump_test empty-address-3a
|
||||
run_dump_test empty-address-3b
|
||||
run_dump_test empty-address-3c
|
||||
run_dump_test empty-address-4
|
||||
|
||||
set LDFLAGS $old_LDFLAGS
|
||||
|
||||
Reference in New Issue
Block a user