summaryrefslogtreecommitdiff
path: root/gold/testsuite/script_test_4.t
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-04-15 22:50:37 +0000
committerIan Lance Taylor <ian@airs.com>2008-04-15 22:50:37 +0000
commite6188289b9a48047e47a8d47cd812bbcc75db554 (patch)
treebebebbfecdff778e8bfca117c30de83b32c86b14 /gold/testsuite/script_test_4.t
parent4f2a9edd9c29db95518668e73369d590ecf6984b (diff)
downloadbinutils-gdb-e6188289b9a48047e47a8d47cd812bbcc75db554.tar.gz
* script-sections.cc (Script_sections::create_segments): Use
header_size_adjustment even when there is enough room for the headers. * testsuite/script_test_4.sh: New file. * testsuite/script_test_4.t: New file. * testsuite/Makefile.am (check_SCRIPTS): Add script_test_4.sh. (check_DATA): Add script_test_4.stdout. (MOSTLYCLEANFILES): Likewise. (script_test_4): New target. (script_test_4.stdout): New target. * testsuite/Makefile.in: Rebuild.
Diffstat (limited to 'gold/testsuite/script_test_4.t')
-rw-r--r--gold/testsuite/script_test_4.t40
1 files changed, 40 insertions, 0 deletions
diff --git a/gold/testsuite/script_test_4.t b/gold/testsuite/script_test_4.t
new file mode 100644
index 00000000000..47ae066ea74
--- /dev/null
+++ b/gold/testsuite/script_test_4.t
@@ -0,0 +1,40 @@
+/* script_test_4.t -- linker script test 4 for gold
+
+ Copyright 2008 Free Software Foundation, Inc.
+ Written by Ian Lance Taylor <iant@google.com>.
+
+ This file is part of gold.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+/* We won't try to run this program, just ensure that it links
+ as expected. */
+
+SECTIONS
+{
+ . = 0x10000400;
+
+ /* With luck this will be enough to get the program working. */
+ .interp : { *(.interp) }
+ .text : { *(.text) }
+ . += 0x100000;
+ . = ALIGN(0x100);
+ .dynamic : { *(.dynamic) }
+ .data : { *(.data) }
+ . += 0x100000;
+ . = ALIGN(0x100);
+ .bss : { *(.bss) }
+}