mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
3c12dcdba0
* expression.cc (class Segment_start_expression): New class definition. (Segment_start_expression::value): New method definition. (script_exp_function_segment_start): Return a new Segment_start_expression. * gold/script-c.h (script_saw_segment_start_expression): New function prototype. * script-sections.cc (Script_sections::Script_sections): Initialize SAW_SEGMENT_START_EXPRESSION_ to false. (Script_sections::set_section_addresses): Use -Ttext, -Tdata and -Tbbs options to specify section addresses if given in command line and no SEGMENT_START expression is seen in a script. * script-sections.h (Script_sections::saw_segment_start_expression, Script_sections::set_saw_segment_start_expression): New method definition. (Script_sections::saw_segment_start_expression_): New data member declaration. * script.cc (script_saw_segment_start_expression): New function. * yyscript.y (SEGMENT_START): Call script_saw_segment_start_expression. * testsuite/Makefile.am (check_SCRIPTS): Add script_test_6.sh, script_test_7.sh and script_test_8.sh. (check_DATA): Add script_test_6.stdout, script_test_7.stdout and script_test_8.stdout. (MOSTLYCLEANFILES): Add script_test_6, script_test_7 and script_test_8. (script_test_6, script_test_6.stdout, script_test_7, script_test_7.stdout, script_test_8, script_test_8.stdout): New rules. * Makefile.in: Regenerate. * testsuite/script_test_6.sh: New file. * testsuite/script_test_6.t: Same. * testsuite/script_test_7.sh: Same. * testsuite/script_test_7.t: Same. * testsuite/script_test_8.sh: Same.
42 lines
1.3 KiB
Raku
42 lines
1.3 KiB
Raku
/* script_test_5.t -- linker script test 5 for gold
|
|
|
|
Copyright 2009 Free Software Foundation, Inc.
|
|
Written by Cary Coutant <ccoutant@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
|
|
{
|
|
. = SEGMENT_START(".text", 0x10000100);
|
|
|
|
/* With luck this will be enough to get the program working. */
|
|
.interp : { *(.interp) }
|
|
.text : { *(.text .text.*) }
|
|
.rodata : { *(.rodata .rodata.*) }
|
|
.dynamic : { *(.dynamic) }
|
|
|
|
. = SEGMENT_START(".data", 0x10200000);
|
|
.data : { *(.data) }
|
|
|
|
. = SEGMENT_START(".bss", 0x10400000);
|
|
.bss : { *(.bss) }
|
|
}
|