Commit Graph

11 Commits

Author SHA1 Message Date
Doug Kwan 3c12dcdba0 2009-10-16 Doug Kwan <dougkwan@google.com>
* 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.
2009-10-16 18:56:07 +00:00
Ian Lance Taylor 8f2eb564dd Permit scripts to refer to the addresses of output sections which were
not created.
2008-02-29 00:04:06 +00:00
Ian Lance Taylor 919ed24cbc Don't check assertions until symbols are finalized. Create an output
section if the script uses a data statement with no input sections.
Don't create a loadable segment for the headers if there is no room.
2008-02-28 04:45:47 +00:00
Ian Lance Taylor 8851eccaec From Craig Silverstein: Have Parameters point to General_options. 2008-02-28 00:18:24 +00:00
Ian Lance Taylor 3edc73f245 Implement remaining linker script functions. 2008-02-13 22:44:50 +00:00
Ian Lance Taylor 7508a0934e Implement LOADADDR and SIZEOF. 2008-02-13 01:18:53 +00:00
Ian Lance Taylor 77e655378d Track sections for expressions. 2008-02-09 01:22:17 +00:00
Ian Lance Taylor 3802b2dd6b Implement SIZEOF_HEADERS, section constraints, other minor linker
script items.
2008-02-04 06:45:50 +00:00
Ian Lance Taylor a445fddf82 Fully implement the SECTIONS clause. 2008-02-04 05:43:05 +00:00
Ian Lance Taylor 494e05f440 Parse a SECTIONS clause in a linker script. 2008-01-23 01:31:13 +00:00
Ian Lance Taylor e5756efb6d Support assignments and expressions in linker scripts. 2008-01-09 19:57:45 +00:00