+2009-10-06 Ian Lance Taylor <iant@google.com>
+
+ * options.h (class General_options): Define
+ split_stack_adjust_size parameter.
+ * object.h (class Object): Add uses_split_stack_ and
+ has_no_split_stack_ fields. Add uses_split_stack and
+ has_no_split_stack accessor functions. Declare
+ handle_split_stack_section.
+ (class Reloc_symbol_changes): Define.
+ (class Sized_relobj): Define Function_offsets. Declare
+ split_stack_adjust, split_stack_adjust_reltype, and
+ find_functions.
+ * object.cc (Object::handle_split_stack_section): New function.
+ (Sized_relobj::do_layout): Call handle_split_stack_section.
+ * dynobj.cc (Sized_dynobj::do_layout): Call
+ handle_split_stack_section.
+ * reloc.cc (Sized_relobj::relocate_sections): Call
+ split_stack_adjust for executable sections in split_stack
+ objects. Pass reloc_map to relocate_section.
+ (Sized_relobj::split_stack_adjust): New function.
+ (Sized_relobj::split_stack_adjust_reltype): New function.
+ (Sized_relobj::find_functions): New function.
+ * target-reloc.h: Include "object.h".
+ (relocate_section): Add reloc_symbol_changes parameter. Change
+ all callers.
+ * target.h (class Target): Add calls_non_split method. Declare
+ do_calls_non_split virtual method. Declare match_view and
+ set_view_to_nop.
+ * target.cc: Include "elfcpp.h".
+ (Target::do_calls_non_split): New function.
+ (Target::match_view): New function.
+ (Target::set_view_to_nop): New function.
+ * gold.cc (queue_middle_tasks): Give an error if mixing
+ split-stack and non-split-stack objects with -r.
+ * i386.cc (Target_i386::relocate_section): Add
+ reloc_symbol_changes parameter.
+ (Target_i386::do_calls_non_split): New function.
+ * x86_64.cc (Target_x86_64::relocate_section): Add
+ reloc_symbol_changes parameter.
+ (Target_x86_64::do_calls_non_split): New function.
+ * arm.cc (Target_arm::relocate_section): Add reloc_symbol_changes
+ parameter.
+ * powerpc.cc (Target_powerpc::relocate_section): Add
+ reloc_symbol_changes parameter.
+ * sparc.cc (Target_sparc::relocate_section): Add
+ reloc_symbol_changes parameter.
+ * configure.ac: Call AM_CONDITIONAL for the default target.
+ * configure: Rebuild.
+ * testsuite/Makefile.am (TEST_AS): New variable.
+ (check_SCRIPTS): Add split_i386.sh and split_x86_64.sh.
+ (check_DATA): Add split_i386 and split_x86_64 files.
+ (SPLIT_DEFSYMS): Define.
+ (split_i386_[1234n].o): New targets.
+ (split_i386_[124]): New targets.
+ (split_i386_[1234r].stdout): New targets.
+ (split_x86_64_[1234n].o): New targets.
+ (split_x86_64_[124]): New targets.
+ (split_x86_64_[1234r].stdout): New targets.
+ (MOSTLYCLEANFILES): Add new executables.
+ * testsuite/split_i386.sh: New file.
+ * testsuite/split_x86_64.sh: New file.
+ * testsuite/split_i386_1.s: New file.
+ * testsuite/split_i386_2.s: New file.
+ * testsuite/split_i386_3.s: New file.
+ * testsuite/split_i386_4.s: New file.
+ * testsuite/split_i386_n.s: New file.
+ * testsuite/split_x86_64_1.s: New file.
+ * testsuite/split_x86_64_2.s: New file.
+ * testsuite/split_x86_64_3.s: New file.
+ * testsuite/split_x86_64_4.s: New file.
+ * testsuite/split_x86_64_n.s: New file.
+ * testsuite/testfile.cc (Target_test): Update relocation_section
+ function.
+ * testsuite/Makefile.in: Rebuild.
+
+2009-10-06 Ian Lance Taylor <iant@google.com>
+
+ * i386.cc (class Target_i386::Relocate): Add ldo_addrs_ field.
+ (Target_i386::Relocate::relocate_tls): Call fix_up_ldo before
+ changing local_dynamic_type_ from LOCAL_DYNAMIC_NONE. When
+ handling R_386_TLS_LDO_32, if local_dynamic_type_ is NONE, push
+ the address on ldo_addrs_.
+ (Target_i386::Relocate::fix_up_ldo): New function.
+
+2009-10-06 Rafael Espindola <espindola@google.com>
+
+ * plugin.cc (add_input_library): New.
+ (Plugin::load): Add add_input_library to tv.
+ (Plugin_manager::add_input_file): Add the is_lib argument.
+ (add_input_file): Update call to Plugin_manager::add_input_file.
+ (add_input_library): New.
+ * plugin.h (Plugin_manager::add_input_file): Add the is_lib argument.
+
+2009-09-30 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Target_arm::may_need_copy_reloc): Check for THUMB function
+ symbol and call Symbol::may_need_copy_reloc to determine if
+ a copy reloc is needed.
+ * copy-relocs.cc (Copy_relocs::need_copy_reloc): Return false if -z
+ nocopyreloc is given in command line.
+ (Copy_relocs::emit_copy_reloc): Assert that -z nocopyreloc is not
+ given in command line.
+ * i386.cc (Target_i386::may_need_copy_reloc): Remove.
+ (Target_i386::Scan::global): Use Symbol::may_need_copy_reloc instead
+ of the removed Target_i386::may_need_copy_reloc.
+ * options.h (copyreloc): New option with default value false.
+ * powerpc.cc (Target_powerpc::may_need_copy_reloc): Remove.
+ (Target_powerpc::Scan::global): Use Symbol::may_need_copy_reloc
+ instead of the removed Target_powerpc::may_need_copy_reloc.
+ * sparc.cc (Target_powerpc::may_need_copy_reloc): Remove.
+ (Target_sparc::Scan::global): Use Symbol::may_need_copy_reloc
+ instead of the removed Target_sparc::may_need_copy_reloc.
+ * symtab.h (Symbol::may_need_copy_reloc): New method definition.
+ * x86_64.cc (Target_powerpc::may_need_copy_reloc): Remove.
+ (Target_x86_64::Scan::global): Use Symbol::may_need_copy_reloc
+ instead of the removed Target_x86_64::may_need_copy_reloc.
+
+2009-09-30 Ian Lance Taylor <iant@google.com>
+
+ * object.h (class Object): Remove target_ field, and target,
+ sized_target, and set_target methods.
+ (Object::sized_target): Remove.
+ (class Sized_relobj): Update declarations. Remove sized_target.
+ * object.cc (Sized_relobj::setup): Remove target parameter.
+ Change all callers.
+ (Input_objects::add_object): Don't do anything with the target.
+ (make_elf_sized_object): Add punconfigured parameter. Change all
+ callers. Set or test parameter target.
+ * dynobj.cc (Sized_dynobj::target): Remove target parameter.
+ Change all callers.
+ * parameters.cc (Parameters::set_target): Change parameter type to
+ be non-const.
+ (Parameters::default_target): Remove.
+ (set_parameters_target): Change parameter type to be non-const.
+ (parameters_force_valid_target): New function.
+ (parameters_clear_target): New function.
+ * parameters.h (class Parameters): Update declarations. Remove
+ default_target method. Add sized_target and clear_target
+ methods. Change target_ to be non-const.
+ (set_parameters_target): Update declaration.
+ (parameters_force_valid_target): Declare.
+ (parameters_clear_target): Declare.
+ * readsyms.cc (Read_symbols::do_read_symbols): Pass punconfigured
+ as NULL if we aren't searching.
+ (Add_symbols::run): Don't check for compatible target.
+ * fileread.cc (Input_file::open_binary): Call
+ parameters_force_valid_target.
+ * gold.cc (queue_middle_tasks): Likewise.
+ * plugin.cc (make_sized_plugin_object): Likewise. Don't call
+ set_target on object.
+ * dynobj.h (class Sized_dynobj): Update declarations.
+ * archive.cc (Archive::get_elf_object_for_member): Return NULL if
+ make_elf_object returns NULL.
+ (Archive::include_member): Don't check whether object target is
+ compatible.
+ * output.cc (Output_section::add_input_section): Get target from
+ parameters.
+ (Output_section::relax_input_section): Likewise.
+ * reloc.cc (Sized_relobj::do_gc_process_relocs): Get target from
+ parameters.
+ (Sized_relobj::do_scan_relocs): Likewise.
+ (Sized_relobj::relocate_sections): Likewise.
+ * resolve.cc (Symbol_table::resolve): Likewise.
+ * symtab.cc (Symbol_table::wrap_symbol): Likewise. Remove object
+ parameter. Change all callers.
+ (Symbol_table::add_from_object): Get target from parameters.
+ (Symbol_table::add_from_relobj): Don't check object target.
+ (Symbol_table::add_from_dynobj): Likewise.
+ (Symbol_table::define_special_symbol): Get target from
+ parameters.
+ * symtab.h (class Symbol_table): Update declaration.
+ * testsuite/binary_unittest.cc (gold_testsuite): Remove target
+ parameter. Change all callers. Clear parameter target.
+ (Binary_test): Test target here.
+ * testsuite/object_unittest.cc (gold_testsuite): Remove
+ target_test_pointer parameter. Change all callers.
+ (Object_test): Test target here.
+
+2009-09-26 Ian Lance Taylor <iant@google.com>
+
+ * testsuite/initpri1.c: Don't try to use constructor priorities if
+ compiling with gcc before 4.3.
+
+2009-09-22 Mikolaj Zalewski <mikolajz@google.com>
+
+ * testsuite/retain_symbols_file_test.sh (check_present): Change
+ output file name to retain_symbols_file_test.stdout.
+ (check_absent): Likewise.
+
+2009-09-18 Craig Silverstein <csilvers@google.com>
+
+ * object.cc (Sized_relobj::do_count): Test should_retain_symbol map.
+ * options.cc: Include <cerrno> and <fstream>.
+ (General_options::finalize): Parse -retain-symbols-file tag.
+ * options.h: New flag.
+ (General_options): New method should_retain_symbol, new
+ variable symbols_to_retain.
+ * symtab.cc (Symbol_table::sized_finalize_symbol): Test
+ should_retain_symbol map.
+ * testsuite/Makefile.am (retain_symbols_file_test): New test.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/retain_symbols_file_test.sh: New file.
+
+2009-09-18 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2009-09-17 Doug Kwan <dougkwan@google.com>
+
+ * debug.h (DEBUG_RELAXATION): New constant.
+ (DEBUG_ALL): Add DEBUG_RELAXATION.
+ (debug_string_to_enum): Add relaxation debug option.
+ * layout.cc
+ (Layout::Relaxation_debug_check::check_output_data_for_reset_values,
+ Layout::Relaxation_debug_check::read_sections,
+ Layout::Relaxation_debug_check::read_sections): New method definitions.
+ (Layout::Layout): Initialize data members
+ record_output_section_data_from_scrips_,
+ script_output_section_data_list_ and relaxation_debug_check_.
+ (Layout::save_segments, Layout::restore_segments,
+ Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation,
+ Layout::relaxation_loop_body): New method definitions.
+ (Layout::finalize): Support relaxation. Move section layout code to
+ Layout::relaxation_loop_body.
+ (Layout::set_asection_address_from_script): Move code for orphan
+ section placement out.
+ (Layout::place_orphan_sections_in_script): New method definition.
+ * layout.h (Output_segment_headers, Output_file_header):
+ New forward class declarations.
+ (Layout::~Layout): Define.
+ (Layout::new_output_section_data_from_script): New method definition.
+ (Layout::place_orphan_sections_in_script): New method declaration.
+ (Layout::Segment_states): New type declaration.
+ (Layout::save_segments, Layout::restore_segments,
+ Layout::clean_up_after_relaxation, Layout::prepare_for_relaxation,
+ Layout::relaxation_loop_body): New method declarations.
+ (Layout::Output_section_data_list): New type declaration.
+ (Layout::Relaxation_debug_check): New class definition.
+ (Layout::record_output_section_data_from_script_,
+ Layout::script_output_section_data_list_, Layout::segment_states_,
+ Layout::relaxation_debug_check_): New data members.
+ * output.cc: (Output_section_headers::do_size): New method definition.
+ (Output_section_headers::Output_section_headers): Move size
+ computation to Output_section_headers::do_size.
+ (Output_segment_headers::do_size): New method definition.
+ (Output_file_header::Output_file_header): Move size computation to
+ Output_file_header::do_size and call it.
+ (Output_file_header::do_size): New method definition.
+ (Output_data_group::Output_data_group): Adjust call to
+ Output_section_data.
+ (Output_data_dynamic::set_final_data_size): Add DT_NULL tag only once.
+ (Output_symtab_xindex::do_write): Add array bound check.
+ (Output_section::Input_section::print_to_mapfile): Handle
+ RELAXED_INPUT_SECTION_CODE.
+ (Output_section::Output_section): Initialize data member checkpoint_.
+ (Output_section::~Output_section): Delete checkpoint object pointed
+ by checkpoint_.
+ (Output_section::add_input_section): Always add an Input_section if
+ relaxing.
+ (Output_section::add_merge_input_section): Add assert.
+ (Output_section::relax_input_section): New method definition.
+ (Output_section::set_final_data_size): Set load address to zero for
+ an unallocated section.
+ (Output_section::do_address_and_file_offset_have_reset_values):
+ New method definition.
+ (Output_section::Input_section_sort_enty::Input_section_sort_enty):
+ Handle relaxed input section.
+ (Output_section::sort_attached_input_sections): Checkpoint input
+ section list lazily.
+ (Output_section::get_input_sections): Change type of input_sections to
+ list of Simple_input_section pointers. Checkpoint input section list
+ lazily. Also handle relaxed input sections.
+ (Output_section::add_input_section_for_script): Take a reference to
+ a Simple_input_section object instead of Relobj pointer and section
+ index as parameter. Handle relaxed input sections.
+ (Output_section::save_states, Output_section::restore_states): New
+ method definitions.
+ * output.h (Output_data::Output_data): Initialize is_data_size_fixed_.
+ (Output_data::is_data_size_fixed): New method definition.
+ (Output_data::reset_addresss_and_file_offset): Do not reset data size
+ if it is fixed.
+ (Output_data::address_and_file_offset_have_reset_values): New method
+ definition.
+ (Output_data::do_address_and_file_offset_have_reset_values): New method
+ definition.
+ (Output_data::set_data_size): Check that data size is not fixed.
+ (Output_data::fix_data_size): New method definition.
+ (Output_data::is_data_size_fixed_): New data member.
+ (Output_section_headers::set_final_data_size): New method definition.
+ (Output_section_headers::do_size): New method declaration.
+ (Output_segment_headers::set_final_data_size): New method definition.
+ (Output_segment_headers::do_size): New method declaration.
+ (Output_file_header::set_final_data_size)::New method definition.
+ (Output_file_header::do_size)::New method declaration.
+ (Output_section_data::Output_section_data): Add new parameter
+ is_data_size_fixed and use it to fix data size.
+ (Output_data_const::Output_data_const): Adjust call to base class
+ constructor and fix data size.
+ (Output_data_const_buffer::Output_data_const_buffer): Adjust call to
+ base class constructor and fix data size.
+ (Output_data_fixed_space::Output_data_fixed_space): Adjust call to
+ base class constructor and fix data size.
+ (Output_data_zero_fill::Output_data_zero_fill): Adjust call to base
+ class constructor and fix data size.
+ (Output_data_group::set_final_data_size): New method definition.
+ (Output_data_dynamic::Dynamic_entry::tag): New method definition.
+ (Output_symtab_xindex::Output_symtab_xindex): Adjust call to base
+ class constructor and fix data size.
+ (Output_relaxed_input_section): New class definition.
+ (Output_section::Simple_input_section): New class definition.
+ (Output_section::get_input_sections): Adjust parameter list.
+ (Output_section::add_input_section_for_script): Same.
+ (Output_section::save_states, Output_section::restore_states,
+ Output_section::do_address_and_file_offset_have_reset_values,
+ (Output_section::Input_section::Input_section): Handle
+ RELAXED_INPUT_SECTION_CODE. Add new overload for
+ Output_relaxed_input_section.
+ (Output_section::Input_section::is_input_section,
+ Output_section::Input_section::set_output_section): Handle relaxed
+ input section.
+ (Output_section::Input_section::is_relaxed_input_section,
+ Output_section::Input_section::output_section_data,
+ Output_section::Input_section::relaxed_input_section): New method
+ definitions.
+ (Output_section::Input_section::RELAXED_INPUT_SECTION_CODE): New enum
+ value.
+ (Output_section::Input_section::u1_): Update comments.
+ (Output_section::Input_section::u2_): Add new union member poris.
+ (Output_section::Checkpoint_output_section): New classs definition.
+ (Output_section::relax_input_section): New method declaration.
+ (Output_section::checkpoint_): New data member.
+ (Output_segment): Update comments.
+ (Output_segment::Output_segment): Un-privatize copy constructor.
+ (Output_segment::operator=): Un-privatize.
+ * script-sections.cc (Output_section_element::Input_section_list):
+ Change element type to Output_section::Simple_input_section.
+ (Output_section_element_dot_assignment::set_section_addresses):
+ Register output section data for relaxation clean up.
+ (Output_data_exression::Output_data_expression): Adjust call to base
+ constructor to fix data size.
+ (Output_section_element_data::set_section_addresses): Register
+ Output_data_expression object for relaxation clean up.
+ (struct Input_section_info): Replace Relobj pointer and section index
+ pair with Output_section::Simple_input_section and Convert struct to a
+ class.
+ (Input_section_sorter::operator()): Adjust access to
+ Input_section_info data member to use accessors.
+ (Output_section_element_input::set_section_addresses): Use layout
+ parameter. Adjust code to use Output_section::Simple_input_section
+ and Input_secction_info classes. Register filler for relaxation
+ clean up.
+ (Orphan_output_section::set_section_addresses): Replace Relobj pointer
+ and section index pair with Output_section::Simple_input_section
+ class. Adjust code accordingly.
+ (Phdrs_element::release_segment): New method definition.
+ (Script_sections::attach_sections_using_phdrs_clause): Do not modify
+ segment list.
+ (Script_sections::release_segments): New method definition.
+ * gold/script-sections.h (Script_sections::release_segments): New
+ method declaration.
+ * gold/target.h (Target::may_relax, Target::relax,
+ Target::do_may_relax, Target::do_relax): New method definitions.
+
2009-09-17 Viktor Kutuzov <vkutuzov@accesssoftek.com>
* arm.cc (has_signed_unsigned_overflow): New function.
(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
Likewise.
-2009-09-08 Cary Coutant <ccoutant@google.com>
+2009-09-16 Cary Coutant <ccoutant@google.com>
* testsuite/Makefile.am (MOSTLYCLEANFILES): Add more generated files.
* testsuite/Makefile.in: Regenerate.