From 1eec346e1275ed5aa982486f5a0d4ea4c21afe15 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 19 Jul 2013 10:39:51 +0000 Subject: * ldgram.y: Add ALIGN_WITH_INPUT output section attribute. * ldlang.c: Likewise. * ldlang.h: Likewise. * ldlex.l: Likewise. * mri.c: Likewise. * ld.texinfo: Document new feature. * NEWS: Mention new feature. * ld-scripts/script.exp: Run align with input test. * ld-scripts/align-with-input.t: New file. * ld-scripts/rgn-at8.d: Likewise. * ld-scripts/rgn-at8.t: Likewise. --- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-scripts/align-with-input.t | 5 +++++ ld/testsuite/ld-scripts/rgn-at8.d | 9 +++++++++ ld/testsuite/ld-scripts/script.exp | 11 +++++++++-- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ld/testsuite/ld-scripts/align-with-input.t create mode 100644 ld/testsuite/ld-scripts/rgn-at8.d (limited to 'ld/testsuite') diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 9eeb006..ddb5bc3 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2013-07-19 Sebastian Huber + + * ld-scripts/script.exp: Run align with input test. + * ld-scripts/align-with-input.t: New file. + * ld-scripts/rgn-at8.d: Likewise. + * ld-scripts/rgn-at8.t: Likewise. + 2013-07-18 Terry Guo * ld-arm/thumb-b-lks-sym.d: Updated to be more flexible. diff --git a/ld/testsuite/ld-scripts/align-with-input.t b/ld/testsuite/ld-scripts/align-with-input.t new file mode 100644 index 0000000..616061c --- /dev/null +++ b/ld/testsuite/ld-scripts/align-with-input.t @@ -0,0 +1,5 @@ +SECTIONS { + .abc : ALIGN(1) ALIGN_WITH_INPUT { + *(.abc) + } +} diff --git a/ld/testsuite/ld-scripts/rgn-at8.d b/ld/testsuite/ld-scripts/rgn-at8.d new file mode 100644 index 0000000..c9d6350 --- /dev/null +++ b/ld/testsuite/ld-scripts/rgn-at8.d @@ -0,0 +1,9 @@ +#source: rgn-at6.s +#ld: -T rgn-at8.t +#objdump: -h --wide +#xfail: rx-*-* +# Test that lma is aligned when lma_region!=region and requested by script. + +#... +.* 0+10000 +0+20000 .* +.* 0+10100 +0+20100 .* diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp index 267c0be..cc099a9 100644 --- a/ld/testsuite/ld-scripts/script.exp +++ b/ld/testsuite/ld-scripts/script.exp @@ -1,7 +1,6 @@ # Test basic linker script functionality # By Ian Lance Taylor, Cygnus Support -# Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2009, 2010 -# Free Software Foundation, Inc. +# Copyright 1999-2013 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -137,3 +136,11 @@ foreach test_script $test_script_list { xpass "REGION_ALIAS: $testname" } } + +set testname "ALIGN_WITH_INPUT" + +if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/align-with-input.t tmpdir/script.o"] { + xfail $testname +} else { + xpass $testname +} -- cgit v1.1