aboutsummaryrefslogtreecommitdiff
path: root/gold/expression.cc
AgeCommit message (Collapse)AuthorFilesLines
2010-11-182010-11-18 Doug Kwan <dougkwan@google.com>Doug Kwan1-5/+7
* expression.cc (BINARY_EXPRESSION): Initialize left_alignment and right_alignment to be zero. Store result alignment only if it is greater than existing alignment.
2010-10-01 * expression.cc (eval): Replace dummy argument with NULL.Nick Clifton1-17/+29
(eval_maybe_dot): Check for a NULL result section pointer. (Symbol_expression::value): Likewise. (Dot_expression::value): Likewise. (BINARY_EXPRESSION): Likewise. (Max_expression::value): Likewise. (Min_expression::value): Likewise. (Absolute_expression::value): Likewise. (Addr_expression::value_from_output_section): Likewise. (Loaddddr_expression::value_from_output_section): Likewise. (Segment_start_expression::value): Likewise. * script-sections.cc (Sections_elememt_dot_assignment::finalize_symbols): Replace dummy argument with NULL. (Sections_elememt_dot_assignment::set_section_addresses): Likewise. (Output_data_expression::do_write_to_buffer): Likewise. (Output_section_definition::finalize_symbols): Likewise. (Output_section_definition::set_section_addresses): Likewise.
2010-09-08 * README: Remove claim that MEMORY is not supported.Nick Clifton1-15/+0
* expression.cc (script_exp_function_origin) (script_exp_function_length): Move from here to ... * script.cc: ... here. (script_set_section_region, script_add_memory) (script_parse_memory_attr, script_include_directive): New functions. * script-sections.cc (class Memory_region): New class. (class Output_section_definition): Add set_memory_region, set_section_vma, set_section_lma and get_section_name methods. (class Script_Sections): Add add_memory_region, find_memory_region, find_memory_region_origin, find_memory_region_length and set_memory_region methods. Have set_section_addresses method walk the list of set memory regions. Extend the print methos to display memory regions. * script-sections.h: Add prototypes for new methods. Add enum for MEMORY region attributes. * yyscript.y: Add support for parsing MEMORY regions. * script-c.h: Add prototypes for new functions. * testsuite/Makefile.am: Add test of MEMORY region functionality. * testsuite/Makefile.in: Regenerate. * testsuite/memory_test.sh: New script. * testsuite/memory_test.s: New assembler source file. * testsuite/memory_test.t: New linker script.
2010-08-25 * archive.cc: Formatting fixes: Remove whitespace betweenNick Clifton1-1/+1
typename and following asterisk. Remove whitespace between function name and opening parenthesis. * archive.h: Likewise. * arm.cc: Likewise. * attributes.cc: Likewise. * attributes.h: Likewise. * common.cc: Likewise. * copy-relocs.cc: Likewise. * dirsearch.h: Likewise. * dynobj.cc: Likewise. * ehframe.cc: Likewise. * ehframe.h: Likewise. * expression.cc: Likewise. * fileread.cc: Likewise. * fileread.h: Likewise. * gc.h: Likewise. * gold-threads.cc: Likewise. * gold.cc: Likewise. * i386.cc: Likewise. * icf.h: Likewise. * incremental-dump.cc: Likewise. * incremental.cc: Likewise. * layout.cc: Likewise. * layout.h: Likewise. * main.cc: Likewise. * merge.cc: Likewise. * merge.h: Likewise. * object.cc: Likewise. * object.h: Likewise. * options.cc: Likewise. * options.h: Likewise. * output.cc: Likewise. * output.h: Likewise. * plugin.cc: Likewise. * plugin.h: Likewise. * powerpc.cc: Likewise. * reloc.cc: Likewise. * script-c.h: Likewise. * script-sections.cc: Likewise. * script.cc: Likewise. * stringpool.cc: Likewise. * symtab.cc: Likewise. * symtab.h: Likewise. * target.cc: Likewise. * timer.cc: Likewise. * timer.h: Likewise. * version.cc: Likewise. * x86_64.cc: Likewise.
2010-04-23 * expression.cc (Expression::Expression_eval_info): AddIan Lance Taylor1-26/+92
result_alignment_pointer field. (Expression::eval_with_dot): Add result_alignment_pointer parameter. Change all callers. (Expression::eval_maybe_dot): Likewise. (class Binary_expression): Add alignment_pointer parameter to left_value and right_value. Change all callers. (BINARY_EXPRESSION): Set result alignment. (class Trinary_expression): Add alignment_pointer parameter to arg2_value and arg3_value. Change all callers. (Trinary_cond::value): Set result alignment. (Max_expression::value, Min_expression::value): Likewise. (Align_expression::value): Likewise. * script-sections.cc (class Sections_element): Add dot_alignment parameter to set_section_addresses virtual function. Update instantiations. (class Output_section_element): Likewise. (Script_sections::create_segments): Add dot_alignment parameter. Change all callers. (Script_sections::create_segments_from_phdrs_clause): Likewise. (Script_sections::set_phdrs_clause_addresses): Likewise. * script-sections.h: Update declarations. * script.h: Update declarations. * output.h (Output_segment::set_minimum_p_align): Don't decrease min_p_align. * testsuite/script_test_3.t: Set large alignment. * testsuite/script_test_3.sh: Make sure that at least one LOAD segment has expected alignment.
2009-12-14 Revert -Wshadow changes, all changes from:Ian Lance Taylor1-7/+7
2009-12-11 Doug Kwan <dougkwan@google.com> 2009-12-11 Nick Clifton <nickc@redhat.com> * configure.ac: Remove -Wshadow when setting WARN_CXXFLAGS.
2009-12-11Add -Wshadow to the gcc command line options used when compiling the binutils.Nick Clifton1-7/+7
Fix up all warnings generated by the addition of this switch.
2009-10-162009-10-16 Doug Kwan <dougkwan@google.com>Doug Kwan1-8/+53
* 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.
2008-02-29Permit scripts to refer to the addresses of output sections which wereIan Lance Taylor1-5/+44
not created.
2008-02-28Don't check assertions until symbols are finalized. Create an outputIan Lance Taylor1-8/+20
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-28From Craig Silverstein: Have Parameters point to General_options.Ian Lance Taylor1-11/+11
2008-02-13Implement remaining linker script functions.Ian Lance Taylor1-25/+105
2008-02-13Implement LOADADDR and SIZEOF.Ian Lance Taylor1-39/+125
2008-02-09Track sections for expressions.Ian Lance Taylor1-101/+193
2008-02-04Implement SIZEOF_HEADERS, section constraints, other minor linkerIan Lance Taylor1-25/+145
script items.
2008-02-04Fully implement the SECTIONS clause.Ian Lance Taylor1-3/+77
2008-01-23Parse a SECTIONS clause in a linker script.Ian Lance Taylor1-6/+139
2008-01-09Support assignments and expressions in linker scripts.Ian Lance Taylor1-0/+508