PR ld/14962

* ld-scripts/pr14962.d, * ld-scripts/pr14962.t,
	* ld-scripts/pr14962a.s, * ld-scripts/pr14962b.s: New test.
	* ld-scripts/expr.exp: Run it.
This commit is contained in:
Alan Modra 2012-12-18 13:38:10 +00:00
parent 15bc576af1
commit 8d708c8cad
6 changed files with 41 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2012-12-19 Alan Modra <amodra@gmail.com>
PR ld/14962
* ld-scripts/pr14962.d, * ld-scripts/pr14962.t,
* ld-scripts/pr14962a.s, * ld-scripts/pr14962b.s: New test.
* ld-scripts/expr.exp: Run it.
2012-12-17 Roland McGrath <mcgrathr@google.com>
* ld-elf/elf.exp (stack exec, stack size): Run for *-*-nacl* targets.

View file

@ -24,3 +24,4 @@ run_dump_test expr1
run_dump_test expr2
run_dump_test sane1
run_dump_test assign-loc
run_dump_test pr14962

View file

@ -0,0 +1,11 @@
#ld: -Ttext=0x1000 -Tdata=0x2000 -T pr14962.t
#source: pr14962a.s
#source: pr14962b.s
#nm: -n
#notarget: rx-*-*
# the reference to x would normally generate a cross-reference error
# but the linker script converts x to absolute to avoid the error
#...
0+2000 A x
#pass

View file

@ -0,0 +1,8 @@
NOCROSSREFS ( .text .data )
x = ABSOLUTE(x);
SECTIONS
{
.text : { *(.text) }
.data : { *(.data) }
/DISCARD/ : { *(*) }
}

View file

@ -0,0 +1,10 @@
.globl main
.globl start
.globl _start
.globl __start
.text
main:
start:
_start:
__start:
.dc.a x

View file

@ -0,0 +1,4 @@
.data
.globl x
x:
.dc.a x