Commit Graph

742 Commits

Author SHA1 Message Date
Ian Lance Taylor d4780e57f5 * testsuite/retain_symbols_file_test.sh: Don't test for __tcf_0. 2009-10-10 01:24:57 +00:00
Ian Lance Taylor d9a893b837 * configure.ac: Check for readv function also.
* fileread.cc (readv): Define if not HAVE_READV.
	* fileread.h (File_read:: max_readv_entries): Set to 1 if readv
	does not exist.
	* config.in: Regenerate.
	* configure: Regenerate.
2009-10-09 23:20:44 +00:00
Doug Kwan c0a6286595 2009-10-09 Doug Kwan <dougkwan@google.com>
* layout.cc (Layout::make_output_section): Call target hook to make
	ordinary output section.
	(Layout::finalize): Adjust parameter list of call the
	Target::may_relax().
	* layout.h (class Layout::section_list): New method.
	* merge.h (Output_merge_base::entsize): Change visibility to public.
	(Output_merge_base::is_string, Output_merge_base::do_is_string):
	New methods.
	(Output_merge_string::do_is_string): New method.
	* object.cc (Sized_relobj::do_setup): renamed from
	Sized_relobj::set_up.
	* object.h (Sized_relobj::adjust_shndx,
	Sized_relobj::initializ_input_to_output_maps,
	Sized_relobj::free_input_to_output_maps): Change visibilities to
	protected.
	(Sized_relobj::setup): Virtualize.
	(Sized_relobj::do_setup): New method declaration.
	(Sized_relobj::invalidate_section_offset,
	Sized_relobj::do_invalidate_section_offset): New method decfinitions.
	(Sized_relobj::elf_file, Sized_relobj::local_values): New methods.
	* options.cc (parse_int): New function.
	* options.h (parse_int): New declaration.
	(DEFINE_int): New macro.
	(stub_group_size): New option.
	* output.cc (Output_section::Output_section): Initialize memebers
	merge_section_map_, merge_section_by_properties_map_,
	relaxed_input_section_map_, is_relaxed_input_section_map_valid_.
	(Output_section::add_input_section): Handled deferred code-fill
	generation and remove an old comment.
	(Output_section::add_relaxed_input_section): New method definition.
	(Output_section::add_merge_input_section): Use merge section by
	properties map to speed to search.  Update merge section maps
	as appropriate.
	(Output_section::build_relaxation_map): New method definition.
	(Output_section::convert_input_sections_in_list_to_relaxed_sections):
	Same.
	(Output_section::relax_input_section): Renamed to
	Output_section::convert_input_sections_to_relaxed_sections and change
	interface to take a vector of pointers to relaxed sections.
	(Output_section::find_merge_section,
	Output_section::find_relaxed_input_section): New method definitions.
	(Output_section::is_input_address_mapped,
	Output_section::output_offset, Output_section::output_address):
	Use output section data maps to speed up searching.
	(Output_section::find_starting_output_address): Add comments.
	(Output_section::do_write,
	Output_section::write_to_postprocessing_buffer): Do code-fill
	generation as appropriate.
	(Output_section::get_input_sections): Invalidate relaxed input section
	map.
	(Output_section::restore_states): Adjust type of checkpoint .
	Invalidate relaxed input section map.
	* output.h (Output_merge_base): New class declaration.
	(Input_section_specifier): New class defintion.
	(class Output_relaxed_input_section) Change base class to
	Output_section_data_build.
	(Output_relaxed_input_section::Output_relaxed_input_section): Adjust
	base class initializer.
	(Output_section::add_relaxed_input_section): New method declaration.
	(Output_section::Input_section): Change visibility to protected.
     	(Output_section::Input_section::relobj,
	Output_section::Input_section::shndx): Handle relaxed input sections.
	Output_section::input_sections) Change visibility to protected.  Also
	define overload to return a non-const pointer.
	(Output_section::Merge_section_properties): New class defintion.
	(Output_section::Merge_section_by_properties_map,
	Output_section::Output_section_data_by_input_section_map,
	Output_section::Relaxation_map): New types.
	(Output_section::relax_input_section): Rename method to
	Output_section::convert_input_sections_to_relaxed_sections and change
	interface to take a vector of relaxed section pointers.
	(Output_section::find_merge_section,
	Output_section::find_relaxed_input_section,
	Output_section::build_relaxation_map,
	Output_section::convert_input_sections_in_list_to_relaxed_sections):
	New method declarations.
	(Output_section::merge_section_map_
	Output_section::merge_section_by_properties_map_,
	Output_section::relaxed_input_section_map_,
	Output_section::is_relaxed_input_section_map_valid_,
	Output_section::generate_code_fills_at_write_): New data members.
	* script-sections.cc
	(Output_section_element_input::set_section_addresses): Call
	current_data_size and addralign methods of relaxed input sections.
	(Orphan_output_section::set_section_addresses): Call current_data_size
	and addralign methods of relaxed input sections.
	* symtab.cc (Symbol_table::compute_final_value): Extract template
	from the body of Symbol_table::sized_finalize_symbol.
	(Symbol_table::sized_finalized_symbol): Call
	Symbol_table::compute_final_value.
	* symtab.h (Symbol_table::Compute_final_value_status): New enum type.
	(Symbol_table::compute_final_value): New templated method declaration.
	* target.cc (Target::do_make_output_section): New method defintion.
	* target.h (Target::make_output_section): New method declaration.
	(Target::relax): Add more parameters for input objects, symbol table
	and layout.  Adjust call to do_relax.
	(Target::do_make_output_section): New method declaration.
	(Target::do_relax): Add parameters for input objects, symbol table
	and layout.
2009-10-09 23:18:19 +00:00
Ian Lance Taylor d446d6c4f7 * pread.c: Include stdio.h. 2009-10-09 23:10:15 +00:00
Ian Lance Taylor bc06c745d9 * plugin.cc: Don't include dlfcn.h when ENABLE_PLUGINS is not
defined.
2009-10-09 23:07:30 +00:00
Ian Lance Taylor 75aea3d03d * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
Change read_shndx type to unsigned int.
	(Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
	int.
	(Sized_dwarf_line_info::read_line_mappings): Likewise.
	* dwarf_reader.h (Sized_dwarf_line_info::Sized_dwarf_line_info):
	Change read_shndx type to unsigned int.
	(Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
	int.
	(Sized_dwarf_line_info::read_line_mappings): Likewise.
	* layout.cc (Layout::create_symtab_sections): Cast the result of
	local_symcount * symsize to off_t in the gold_assert.
2009-10-09 23:05:21 +00:00
Ian Lance Taylor be8fcb7563 * arm.cc (Target_arm::relocate::reloc_is_non_pic): Return true for
R_ARM_THM_ABS5, R_ARM_ABS8, R_ARM_ABS12, R_ARM_ABS16,
	R_ARM_BASE_ABS.
	(Arm_relocate_functions::abs8): Remove has_thumb_bit parameter.
	(Arm_relocate_functions::thm_abs5): New function.
	(Arm_relocate_functions::abs12): New function.
	(Arm_relocate_functions::abs16): New function.
	(Arm_relocate_functions::base_abs): New function.
	(Scan::check_non_pic): Handle R_ARM_ABS32_NOI.
	(Scan::local): Remove special handling of R_ARM_ABS8.  Handle
	R_ARM_ABS32_NOI, R_ARM_THM_ABS5, R_ARM_ABS12, R_ARM_ABS16, and
	R_ARM_BASE_ABS.
	(Scan::global): Likewise.
	(Relocate::relocate): Handle R_ARM_ABS12, R_ARM_ABS16,
	R_ARM_ABS32_NOI, R_ARM_THM_ABS5, and R_ARM_BASE_ABS.
	(Relocatable_size_for_reloc::get_size_for_reloc): Handle
	R_ARM_ABS16, R_ARM_THM_ABS5, R_ARM_ABS32_NOI, R_ARM_ABS12, and
	R_ARM_BASE_ABS.
2009-10-09 22:56:41 +00:00
Ian Lance Taylor c2a122b635 * arm.cc (Arm_relocate_functions::movw_prel_nc): New function.
(Arm_relocate_functions::movt_prel): New function.
	(Arm_relocate_functions::thm_movw_prel_nc): New function.
	(Arm_relocate_functions::thm_movt_prel): New function.
	(Scan::local): Handle R_ARM_MOVW_PREL_NC, R_ARM_MOVT_PREL,
	R_ARM_THM_MOVW_PREL_NC, and R_ARM_THM_MOVT_PREL.
	(Scan::global, Relocate::relocate): Likewise.
	(Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
2009-10-09 22:45:13 +00:00
Ian Lance Taylor c4aa1e2d74 elfcpp/:
* elf_file.h: (class Elf_strtab): New class.
gold/:
	* gold.cc: (queue_initial_tasks): Pass incremental_inputs to
	Incremental_checker.
	* incremental.cc: (INCREMENTAL_LINK_VERSION): Change type to
	unsigned int.
	(class Incremental_inputs_header): New class.
	(Incremental_inputs_header_writer): Edit comment.
	(Incremental_inputs_entry): New class.
	(Incremental_inputs_entry_writer): Edit comment.
	(Sized_incremental_binary::do_find_incremental_inputs_section):
	Add *strtab_shndx parameter, fill it.
	(Sized_incremental_binary::do_check_inputs): New method.
	(Incremental_checker::can_incrementally_link_output_file): Use
	Sized_incremental_binary::check_inputs.
	(Incremental_inputs::report_command_line): Save command line in
	command_line_.
	* incremental.h:
	(Incremental_binary::find_incremental_inputs_section): New
	method.
	(Incremental_binary::do_find_incremental_inputs_section): Add
	strtab_shndx parameter.
	(Incremental_binary::do_check_inputs): New pure virtual method.
	(Sized_incremental_binary::do_check_inputs): Declare.
	(Incremental_checker::Incremental_checker): Add incremental_inputs
	parameter, use it to initialize incremental_inputs_.
	(Incremental_checker::incremental_inputs_): New field.
	(Incremental_checker::command_line): New method.
	(Incremental_checker::inputs): New method.
	(Incremental_checker::command_line_): New field.
2009-10-09 22:38:07 +00:00
Ian Lance Taylor c549a6949c elfcpp/:
* elfcpp_file.h: Fix header guard.  Include <cstdio>.
	(class Elf_recognizer): New class, code from gold/object.cc.
	(Elf_file::find_section_by_type): New method.
gold/:
	* incremental.cc: Include <cstdarg> and "target-select.h".
	(vexplain_no_incremental): New function.
	(explain_no_incremental): New function.
	(Incremental_binary::error): New method.
	(Sized_incremental_binary::do_find_incremental_inputs_section): New
	method.
	(make_sized_incremental_binary): New function.
	(open_incremental_binary): New function.
	(can_incrementally_link_file): Add checks if output is ELF and has
	inputs section.
	* incremental.h: Include "elfcpp_file.h" and "output.h".
	(Incremental_binary): New class.
	(Sized_incremental_binary): New class.
	(open_incremental_binary): Declare.
	* object.cc (is_elf_object): Use
	elfcpp::Elf_recognizer::is_elf_file.
	(make_elf_object): Use elfcpp::Elf_recognizer::is_valid_header.
	* output.h (Output_file::filesize): New method.
2009-10-09 16:40:51 +00:00
Ian Lance Taylor fd3c5f0b49 * arm.cc (Arm_relocate_functions::extract_arm_movw_movt_addend):
New function.
	(Arm_relocate_functions::insert_val_arm_movw_movt): New function.
	(Arm_relocate_functions::extract_thumb_movw_movt_addend): New
	function.
	(Arm_relocate_functions::insert_val_thumb_movw_movt): New
	function.
	(Arm_relocate_functions::movw_abs_nc): New function.
	(Arm_relocate_functions::movt_abs): New function.
	(Arm_relocate_functions::thm_movw_abs_nc): New function.
	(Arm_relocate_functions::thm_movt_abs): New function.
	(Scan::local): Handle R_ARM_MOVW_ABS_NC, R_ARM_MOVT_ABS,
	R_ARM_THM_MOVW_ABS_NC, R_ARM_THM_MOVT_ABS.
	(Scan::global): Likewise.
	(Relocate::relocate): Likewise.
	(Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
2009-10-07 15:41:50 +00:00
Ian Lance Taylor 7f5309a5cc * arm.cc (Arm_relocate_functions::got_prel) New function.
(Scan::local, Scan::global): Handle R_ARM_GOT_PREL.
	(Relocate::relocate): Likewise.
	(Relocatable_size_for_reloc::get_size_for_reloc): Likewise.
2009-10-07 15:30:40 +00:00
Ian Lance Taylor 364c7fa5c9 * 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 22:58:27 +00:00
Ian Lance Taylor d6f22b9890 Tweak last patch. 2009-10-06 21:44:11 +00:00
Ian Lance Taylor e8a9fcdace * 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 21:36:00 +00:00
Ian Lance Taylor e99daf92c2 * 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-10-06 20:15:09 +00:00
Doug Kwan 966d409744 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-10-01 00:58:38 +00:00
Ian Lance Taylor 029ba97335 * 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-30 22:21:13 +00:00
Ian Lance Taylor a6a22b839b * testsuite/initpri1.c: Don't try to use constructor priorities if
compiling with gcc before 4.3.
2009-09-27 05:20:03 +00:00
Ian Lance Taylor 6a8f49fe0a * testsuite/retain_symbols_file_test.sh (check_present): Change
output file name to retain_symbols_file_test.stdout.
	(check_absent): Likewise.
2009-09-22 19:54:46 +00:00
Craig Silverstein 8c60465154 * 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 20:03:22 +00:00
Nick Clifton ca58b19f00 Updated Spanish and Vietnamese translations 2009-09-18 07:54:47 +00:00
Doug Kwan 20e6d0d602 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-18 01:10:38 +00:00
Ian Lance Taylor 5e445df679 * arm.cc (has_signed_unsigned_overflow): New function.
(Arm_relocate_functions::abs8): New function.
	(Target_arm::Scan::local): Handle R_ARM_ABS8.
	(Target_arm::Scan::global): Likewise.
	(Target_arm::relocate::relocate): Likewise.
	(Target_arm::Relocatable_size_for_reloc::get_size_for_reloc):
	Likewise.
2009-09-18 00:45:53 +00:00
Cary Coutant 72fef11a67 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add more generated files.
* testsuite/Makefile.in: Regenerate.
2009-09-16 20:57:27 +00:00
Nick Clifton 1e9cc1c27b * po/bfd.pot: Updated by the Translation project.
* po/binutils.pot: Updated by the Translation project.
        * po/gold.pot: Updated by the Translation project.
        * po/gold.pot: Updated by the Translation project.
        * po/gprof.pot: Updated by the Translation project.
        * po/sv.po: Updated Swedish translation.
        * po/ld.pot: Updated by the Translation project.
        * po/fi.po: Updated Finnish translation.
        * po/ld.pot: Updated by the Translation project.
        * po/fi.po: Updated Finnish translation.

        Updated sources to compile cleanly with -Wc++-compat:
        * basic_blocks.c: Add casts.
        * cg_dfn.c: Add cast.
        * corefile.c: Add casts.
        * gmon_io.c: Add casts.
        * hist.c: Add cast.
        * source.c: Add cast.
        * sym_ids.c (struct match): Moved to top level.

        Updated soruces in ld/* to compile cleanly with -Wc++-compat:
        * ld.h (enum endian_enum,enum symbolic_enum,enum dynamic_list_enum): Move to top level.
        * ldcref.c: Add casts.
        * ldctor.c: Add casts.
        * ldexp.c
        * ldexp.h (enum node_tree_enum,enum phase_enum): Move to top level.
        * ldlang.c: Add casts. (lang_insert_orphan): Use enum name instead of integer.
        * ldlang.h (enum statement_enum): Move to top level.
        * ldmain.c: Add casts.
        * ldwrite.c: Add casts.
        * lexsup.c: Add casts. (enum control_enum): Move to top level.
        * mri.c: Add casts. (mri_draw_tree): Use enum name instead of integer.

        Updated sources to compile cleanly with -Wc++-compat:
        * basic_blocks.c: Add casts.
        * cg_dfn.c: Add cast.
        * corefile.c: Add casts.
        * gmon_io.c: Add casts.
        * hist.c: Add cast.
        * source.c: Add cast.
        * sym_ids.c (struct match): Moved to top level.

        * as.c (main): Call dwarf2_init.
        * config/obj-elf.c (struct group_list): New field.
        (build_group_lists): Use hash lookup.
        (free_section_idx): New function.
        (elf_frob_file): Adjust.
        * dwarf2dbg.c (all_segs_hash, last_seg_ptr): New variables.
        (get_line_subseg): Adjust.
        (dwarf2_init): New function.
        * dwarf2dbg.h (dwarf2_init): New declaration.
2009-09-11 15:27:38 +00:00
Cary Coutant 6a89f575aa * output.cc (Output_file::open): Add execute permission to empty file.
* testsuite/Makefile.am (permission_test): New test.
	* testsuite/Makefile.in: Regenerate.
2009-09-08 22:32:51 +00:00
Ian Lance Taylor fdcac5af29 * output.cc (Output_file::resize): Call map_no_anonymous rather
than map.
2009-09-02 16:39:06 +00:00
Ian Lance Taylor 44453f85d9 * gold.cc: Include "incremental.h".
(queue_initial_tasks): Call Incremental_checker methods.
	* incremental.cc: Include "output.h".
	(Incremental_checker::can_incrementally_link_output_file): New
	method.
	* incremental.h (Incremental_checker): New class.
2009-09-01 17:32:35 +00:00
Ian Lance Taylor 404c2abb01 * output.cc (Output_file::open_for_modification): New method.
(Output_file::map_anonymous): Changed return type to bool.  Record
	map in base_ field.
	(Output_file::map_no_anonymous): New method, broken out of map.
	(Output_file::map): Use map_no_anonymous and map_anonymous.
	* output.h (class Output_file): Update declarations.
2009-09-01 17:32:20 +00:00
Cary Coutant 293c13867a * options.h (Command_line::Pre_options): New class.
(Command_line::pre_options): New member.
	* options.cc (gold::options::ready_to_register): New variable.
	(One_option::register_option): Do nothing if not registering options.
	Assert if same short option registered twice.
	(General_options::General_options): Turn off option registration when
	done constructing.
	(Command_line::Pre_options::Pre_options): New constructor.
2009-08-25 01:10:48 +00:00
Cary Coutant 06a73cfe76 Fixed typo in ChangeLog. 2009-08-24 23:33:33 +00:00
Cary Coutant f773f3d2dc (General_options::no_keep_memory): Remove incorrect short option. 2009-08-24 23:31:45 +00:00
Ralf Wildenhues a15af8e2a7 Fix yacc and lex reruns with maintainer-mode off.
gas/:
	* Makefile.am (am__skiplex, am__skipyacc): New.
	* Makefile.in: Regenerate.

ld/:
	* Makefile.am (am__skiplex, am__skipyacc): New.
	* Makefile.in: Regenerate.

binutils/:
	* Makefile.am (am__skiplex, am__skipyacc): New.
	* Makefile.in: Regenerate.

gold/:
	* Makefile.am (am__skiplex, am__skipyacc): New.
	* Makefile.in: Regenerate.
2009-08-24 05:55:55 +00:00
Ralf Wildenhues 14ec8efdb1 Cleanups in binutils makefiles.
ld/:
	* Makefile.am (bin_PROGRAMS): Renamed from ...
	(noinst_PROGRAMS): ... this.
	(transform): Override, including the renaming of ld-new to ld.
	(install-exec-local): Installation of ld in $(bindir) not needed
	here any more.
	(AM_CPPFLAGS): Renamed from ...
	(INCLUDES): ... this.
	(MAINTAINERCLEANFILES): Add ld.1.
	* Makefile.in: Regenerate.

gold/:
	* Makefile.am (AM_CPPFLAGS): Renamed from ...
	(INCLUDES): ... this.
	* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add -Wno-portability.
	(AM_CPPFLAGS): Renamed from ...
	(INCLUDE): ... this.
	* Makefile.in, testsuite/Makefile.in: Regenerate.

bfd/:
	* Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
	appending.
	[INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
	only in this condition.
	[!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
	to build but not install libbfd.la in this condition.
	(install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
	(install_libbfd, install_libbfd): Remove.
	* Makefile.in: Regenerate.

binutils/:
	* Makefile.am (AM_CPPFLAGS): Renamed from ...
	(INCLUDES): ... this.
	(bin2c$(EXEEXT_FOR_BUILD): Adjust rule.
	(installcheck-local): Renamed from ...
	(installcheck): ... this.
	* Makefile.in: Regenerate.

gas/:
	* Makefile.am (YFLAGS): Remove, not needed any more.
	(AM_CPPFLAGS): Renamed from ...
	(INCLUDES): ... this.
	* Makefile.in: Regenerate.

gprof/:
	* Makefile.am (AM_CPPFLAGS): Renamed from ...
	(INCLUDES): ... this.
	* Makefile.in: Regenerate.

opcodes/:
	* Makefile.am (libopcodes_la_LDFLAGS): Initialize early.
	[INSTALL_LIBBFD] (bfdlib_LTLIBRARIES): Set only in this condition.
	[INSTALL_LIBBFD] (bfdinclude_DATA): New.
	[!INSTALL_LIBBFD] (noinst_LTLIBRARIES): New.
	[!INSTALL_LIBBFD] (libopcodes_la_LDFLAGS): Ensure libopcodes.la
	is built shared even if it is not to be installed.
	(install-bfdlibLTLIBRARIES,uninstall-bfdlibLTLIBRARIES)
	(install_libopcodes, uninstall_libopcodes): Remove.
	(AM_CPPFLAGS): Renamed from ...
	(INCLUDES): ... this.
	* Makefile.in: Regenerate.
2009-08-22 19:02:57 +00:00
Ralf Wildenhues 81ecdfbb4d Regenerate tree using Autoconf 2.64 and Automake 1.11.
config/:
	* override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64.

/:
	* configure: Regenerate.

etc/:
	* configure: Regenerate.

sim/common/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/iq2000/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/d10v/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/igen/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m32r/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/frv/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/:
	* avr/config.in: Regenerate.
	* avr/configure: Likewise.
	* configure: Likewise.
	* cris/config.in: Likewise.
	* cris/configure: Likewise.

sim/h8300/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mn10300/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/ppc/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/erc32/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/arm/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m68hc11/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/lm32/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/sh64/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/v850/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/cr16/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/moxie/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/m32c/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mips/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/mcore/:
	* config.in: Regenerate.
	* configure: Likewise.

sim/testsuite/d10v-elf/:
	* configure: Regenerate.

sim/testsuite/:
	* configure: Regenerate.

sim/testsuite/frv-elf/:
	* configure: Regenerate.

sim/testsuite/m32r-elf/:
	* configure: Regenerate.

sim/testsuite/mips64el-elf/:
	* configure: Regenerate.

sim/sh/:
	* config.in: Regenerate.
	* configure: Likewise.

gold/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.

gprof/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* gconfig.in: Likewise.

opcodes/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

gas/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

ld/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

gdb/:
	* aclocal.m4: Regenerate.
	* config.in: Likewise.
	* configure: Likewise.
	* gnulib/Makefile.in: Likewise.

gdb/doc/:
	* configure: Regenerate.

gdb/gdbserver/:
	* aclocal.m4: Regenerate.
	* config.in: Likewise.
	* configure: Likewise.

gdb/testsuite/:
	* configure: Regenerate.
	* gdb.hp/configure: Likewise.
	* gdb.hp/gdb.aCC/configure: Likewise.
	* gdb.hp/gdb.base-hp/configure: Likewise.
	* gdb.hp/gdb.compat/configure: Likewise.
	* gdb.hp/gdb.defects/configure: Likewise.
	* gdb.hp/gdb.objdbg/configure: Likewise.
	* gdb.stabs/configure: Likewise.

binutils/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.
	* doc/Makefile.in: Likewise.

bfd/:
	* Makefile.in: Regenerate.
	* aclocal.m4: Likewise.
	* config.in: Likewise.
	* configure: Likewise.

bfd/doc/:
	* Makefile.in: Regenerate.

readline/:
	* configure: Regenerate.

readline/examples/rlfe/:
	* configure: Regenerate.
2009-08-22 16:56:56 +00:00
Ralf Wildenhues c462b41bcd Minor fixes in sim, gold, gdb for Autoconf 2.64, Automake 1.11.
gold/:
	* Makefile.am (AUTOMAKE_OPTIONS): Add foreign.
	* testsuite/Makefile.am (AUTOMAKE_OPTIONS): Add foreign.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

gdb/:
	* configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of
	AC_GNU_SOURCE, AC_AIX, AC_ISC_POSIX.

sim/common/:
	* aclocal.m4 (SIM_CHECK_MEMBER): Replace definition with
	definition of AC_CHECK_MEMBER.
2009-08-22 15:59:24 +00:00
Cary Coutant 2da73f13b5 * resolve.cc (Symbol_table::resolve): Don't complain about defined
symbols in shared libraries overridden by hidden or internal symbols
	in the main program.
2009-08-19 17:53:50 +00:00
Chris Demetriou 2db7050185 2009-08-19 Chris Demetriou <cgd@google.com>
* testsuite/debug_msg.sh: Match .* rather than ${srcdir} when
        checking source file names in error messages.
2009-08-19 17:41:44 +00:00
Doug Kwan f733487b04 2009-08-18 Doug Kwan <dougkwan@google.com>
* dynobj.cc (Sized_dynobj::setup): Take a Target object instead of
	an elcpp::Ehdr as parameter.  Adjust call to set_target.
	* dynobj.h (Sized_dynobj::setup): Take a Target object instead of
	an elfcpp::Ehdr as parameter.
	* object.cc (Object::set_target): Remove the version that looks up
	a target and sets it.
	(Sized_relobj::setup): Take a Target object instead of
	an elfcpp::Ehdr as parameter.  Adjust call to set_target.
	(make_elf_sized_object): Find target and ask target to
	make an ELF object.
	* object.h: (Object::set_target): Remove the version that looks up
	a target and sets it.
	(Sized_relobj::setup): Take a Target object instead of
	an elfcpp:Ehdr as parameter.
	* target.cc: Include dynobj.h.
	(Target::do_make_elf_object_implementation): New.
 	(Target::do_make_elf_object): New.
	* target.h (Target::make_elf_object): New template declaration.
	(Target::do_make_elf_object): New method declarations.
	(Target::do_make_elf_object_implementation): New template declaration.
2009-08-18 23:49:29 +00:00
Ian Lance Taylor cc70f101e2 * gold.h (FUNCTION_NAME): Define.
(gold_unreachable): Use FUNCTION_NAME.
2009-08-14 09:35:38 +00:00
Sriraman Tallam ef5e0cb158 2009-08-12 Sriraman Tallam <tmsriram@google.com>
* icf.cc (Icf::find_identical_sections): Issue a warning when a
	symbol in the --keep-unique list is not found.
2009-08-13 00:03:43 +00:00
Sriraman Tallam 48c187ced8 Sriraman Tallam <tmsriram@google.com>
* icf.cc (Icf::find_identical_sections): Unfold symbols that have
	been maked as --keep-unique.
	(Icf::unfold_section): New function.
	* icf.h (Icf::unfold_section): New function.
	* options.h (General_options::keep_unique): New option.
	* testsuite/Makefile.am: Add commands to build icf_keep_unique_test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/icf_keep_unique_test.sh: New file.
	* testsuite/icf_keep_unique_test.cc: New file.
2009-08-12 19:03:16 +00:00
Cary Coutant 645afe0c5b PR 10471
* resolve.cc (Symbol_table::resolve): Check for references from
	dynamic objects to hidden and internal symbols.
	* testsuite/Makefile.am (hidden_test.sh): New test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/hidden_test.sh: New script.
	* testsuite/hidden_test_1.c: New test source.
	* testsuite/hidden_test_main.c: New test source.
2009-08-12 18:30:39 +00:00
Doug Kwan 11af873fca 2009-08-11 Doug Kwan <dougkwan@google.com>
* arm.cc: Update comments.
	(Target_arm::do_finalize_sections): Add a special PT_ARM_EXIDX
	segment to locate the .ARM.exidx section if present.
2009-08-11 17:09:14 +00:00
Doug Kwan b9f7d72d24 Revert the previous change.
http://sourceware.org/ml/binutils-cvs/2009-08/msg00043.html
2009-08-10 02:29:30 +00:00
Sriraman Tallam ddd3c53c3d *** empty log message *** 2009-08-07 18:48:44 +00:00
Sriraman Tallam 2772106215 *** empty log message *** 2009-08-07 18:29:54 +00:00
Sriraman Tallam ef15dade89 *** empty log message *** 2009-08-05 20:51:56 +00:00
Chris Demetriou c3b65ac4d0 2009-07-24 Chris Demetriou <cgd@google.com>
* layout.cc (is_compressible_debug_section): Fix incorrect
        comment about compressed section names.
2009-07-24 23:13:51 +00:00
Ian Lance Taylor 1caf2c519a PR 10419
* x86_64.cc (Target_x86_64::do_code_fill): Correct nop sequences.
2009-07-21 05:22:54 +00:00
Ian Lance Taylor 1ef4d87fe8 PR 10400
* layout.h: #include <map>.
	(class Kept_section): Change from struct to class.  Add accessors
	and setters.  Add section size to Comdat_group mapping.  Change
	Comdat_group to std::map.  Add is_comdat_ field.  Add
	linkonce_size field in union.
	(class Layout): Update declaration of find_or_add_kept_section.
	Don't declare find_kept_object.
	* layout.cc (Layout::find_or_add_kept_section): Remove candidate
	parameter.  Add object, shndx, is_comdat, and is_group_name
	parameters.  Change all callers.  Adjust for new Kept_section.
	(Layout::find_kept_object): Remove.
	* object.cc (Sized_relobj::include_section_group): Update use of
	Kept_section.  Rename secnum to shndx.  Only record
	Kept_comdat_section if sections are the same size.
	(Sized_relobj::include_linkonce_section): Update use of
	Kept_section.  Only record Kept_comdat_section if sections are the
	same size.  Set size of linkonce section.
	(Sized_relobj::map_to_kept_section): Update call to
	get_kept_comdat_section.
	* object.h (class Sized_relobj): Rename fields in
	Kept_comdat_section to drop trailing underscores; change object
	field to Relobj*.  Change Kept_comdat_section_table to store
	struct rather than pointer.
	(Sized_relobj::set_kept_comdat_section): Remove kept parameter.
	Add kept_object and kept_shndx parameters.  Change all callers.
	(Sized_relobj::get_kept_comdat_section): Change return type to
	bool.  Add kept_object and kept_shndx parameters.  Change all
	callers.
	* plugin.cc (Pluginobj::include_comdat_group): Update call to
	Layout::find_or_add_kept_section.
2009-07-17 01:07:33 +00:00
Ian Lance Taylor 37c3b7b014 * merge.cc (Object_merge_map::initialize_input_to_output_map):
Reserve space in the hash table.
2009-07-09 23:29:55 +00:00
Ian Lance Taylor 98fa85cb42 * fileread.cc (File_read::get_mtime): New method.
* fileread.h (Timespec): New structure.
	(File_read::get_mtime): New method.
	* incremental.cc (Incremental_inputs_entry_data::timestamp_usec):
	Renamed from timestamp_nsec.
	(Incremental_inputs_entry_write::timestamp_sec): Fix argument to
	Elf_Xword.
	(Incremental_inputs_entry_write::timestamp_usec): Renamed from
	timestamp_nsec.
	(Incremental_inputs::report_archive): Save mtime; style fix.
	(Incremental_inputs::report_obejct): Save mtime; style fix.
	(Incremental_inputs::report_script): Save mtime; style fix.
	(Incremental_inputs::finalize_inputs): Style fix.
	(Incremental_inputs::finalize): Style fix.
	(Incremental_inputs::create_input_section_data): Store inputs
	mtime.
	* incremental.h (Incremental_inputs::report_script): Add mtime
	argument.
	(Incremental_inputs::Input_info::Input_info): Intialize only one
	union member.
	(Incremental_inputs::Input_info::archive): Move to nameless
	union.
	(Incremental_inputs::Input_info::obejct): Move to nameless union.
	(Incremental_inputs::Input_info::script): Move to nameless union.
	(Incremental_inputs::mtime): New field.
	* script.cc (read_input_script): Pass file mtime to
	Incremental_input.
	* script.h (Script_info::inputs): Style fix.
2009-07-06 23:11:21 +00:00
Ian Lance Taylor c9d707578e * freebsd.h (Target_freebsd::do_adjust_elf_header): Use size
instead of 32.
2009-07-01 16:21:36 +00:00
Ian Lance Taylor 9c547ec3ac PR 10156
* layout.cc (Layout::choose_output_section): If we find an
	existing section, update the flags.
	(Layout::create_notes): New function, broken out of
	Layout::finalize.
	(Layout::finalize): Don't create note sections.
	(Layout::create_note): Don't crash if linker script discards
	section.
	(Layout::create_gold_note): Likewise.
	(Layout::create_build_id): Likewise.  Don't set
	after_input_sections on the section.
	(Layout::create_executable_stack_info): Remove target parameter.
	Change caller.
	* layout.h (class Layout): Declare create_notes.  Update
	declaration of create_executable_stack_info.
	* gold.cc (queue_middle_tasks): Call create_notes.
	* output.cc (Output_section::update_flags_for_input_section): Move
	here from output.h.  If SHF_ALLOC flag is newly set, mark address
	invalid.
	* output.h (Output_data::mark_address_invalid): New function.
	(class Output_section): Only declare, not define,
	update_flags_for_input_section.  Remove set_flags.
2009-06-24 19:48:51 +00:00
Ian Lance Taylor 554585003d * script-sections.cc (Output_section_definition::
set_section_addresses): Rename shadowing local load_address to
	laddr.
2009-06-24 19:00:15 +00:00
Ian Lance Taylor 1307d6cd4a PR 10244
* reloc.cc (relocate_sections): Skip empty relocation sections.
2009-06-24 14:36:14 +00:00
Ian Lance Taylor ec3f783efd PR 10156
* layout.cc (Layout::create_note): Use choose_output_section
	rather than make_output_section.
2009-06-24 05:09:11 +00:00
Ian Lance Taylor 459c9f1c5f PR 10237
* options.cc (General_options::parse_V): Set printed_version_.
	(General_options::General_options): Initialize printed_version_.
	* options.h (class General_options): Add printed_version_ field.
	* gold.cc (queue_initial_tasks): If there are no input files,
	don't give a fatal error if we printed the version information.
	(queue_middle_tasks): If using -r with a shared object, give a
	fatal error rather than an ordinary error.
2009-06-24 05:01:17 +00:00
Ian Lance Taylor 1518dc8f89 PR 10219
* layout.cc (Layout::Layout): Initialize have_stabstr_section_.
	(Layout::make_output_section): Set have_stabstr_section_ if we see
	a .stab*str section.
	(Layout::finalize): Call link_stabs_sections.
	(Layout::link_stabs_sections): New file.
	* layout.h (class Layout): Add have_stabstr_section_ field.
	Declare link_stabs_sections.
2009-06-24 00:38:00 +00:00
Doug Kwan 3d857b98f5 2009-06-23 Doug Kwan <dougkwan@google.com>
* Makefile.am (libgold_a_LIBADD): New.
	(ld_new_DEPENDENCIES, ld_new_LDADD): Remove LIBOBJS
 	* Makefile.in: Regenerate.
	* config.in (HAVE_DECL_MEMMEM, HAVE_DECL_STRNDUP): New.
	* configure: Regenerate.
	* configure.ac (AC_CHECK_DECLS): Add strndup and memmem.
	* fileread.cc: Include sys/state.h
	* gold.h: Declare memmem and strndup if found missing.
	* gold_reloc.h: Include byteswap.h if HAVE_BYTESWAP_H is defined.
2009-06-23 18:10:42 +00:00
Ian Lance Taylor 0639a6f662 * configure.ac: Call AC_CHECK_DECLS using C, not C++.
* configure: Rebuild.
2009-06-23 14:37:24 +00:00
Ian Lance Taylor 8d63875c54 PR 10147
* object.cc (Object::section_contents): Don't try to get a view if
	the section has length zero.
	(Object::handle_gnu_warning_section): If the section is empty, use
	the name of the section as the warning.
2009-06-23 07:19:35 +00:00
Ian Lance Taylor f7c8a183e8 PR 10133
* stringpool.h (class Stringpool_template): Add optimize_ field.
	(Stringpool_template::set_optimize): New function.
	* stringpool.cc (Stringpool_template::Stringpool_template):
	Initialize optimize_ field.
	(Stringpool_template::set_string_offsets): Test local optimize
	fild rather than parameter.
	* layout.cc (Layout::Layout): Call set_optimize on the section
	name stringpool.
2009-06-23 07:04:10 +00:00
Ian Lance Taylor e6a307bae3 PR 10030
* yyscript.y: Parse TARGET.
	* script.cc (script_set_target): New function.
	* script-c.h (script_set_target): Declare.
	* options.cc (General_options::string_to_object_format): Rename
	from string_to_object_format in anonymous namespace.  Change
	callers.
	* options.h (class General_options): Declare
	string_to_object_format.
2009-06-23 06:39:47 +00:00
Ian Lance Taylor 3ee173de46 * script-sections.cc (Script_sections::create_segments): Don't put
program headers in a PT_LOAD segment if -n or -N.
2009-06-23 06:07:50 +00:00
Ian Lance Taylor e1c74d6051 PR 10141
* options.h (class General_options): Add -z lazy and -z now.  Sort
	-z options into alphabetical order.
	* layout.cc (Layout::finish_dynamic_section): Handle -z now.
2009-06-22 20:23:21 +00:00
Ian Lance Taylor cd6739a176 Fix ChangeLog e-mail address. 2009-06-22 06:52:11 +00:00
Ian Lance Taylor 8a5e3e08a6 * layout.cc (Layout::make_output_section): Call
Target::new_output_section.
	(Layout::attach_allocated_section_to_segment): Put large section
	sections in a separate load segment with the large segment flag
	set.
	(Layout::segment_precedes): Sort large data segments after other
	load segments.
	(align_file_offset): New static function.
	(Layout::set_segment_offsets): Use align_file_offset.
	* output.h (class Output_section): Add is_small_section_ and
	is_large_section_ fields.
	(Output_section::is_small_section): New function.
	(Output_section::set_is_small_section):  New function.
	(Output_section::is_large_section): New function.
	(Output_section::set_is_large_section): New function.
	(Output_section::is_large_data_section): New function.
	(class Output_segment): Add is_large_data_segment_ field.
	(Output_segment::is_large_data_segment): New function.
	(Output_segment::set_is_large_data_segment): New function.
	* output.cc (Output_section::Output_section): Initialize new
	fields.
	(Output_segment::Output_segment): Likewise.
	(Output_segment::add_output_section): Add assertion that large
	data sections always go in large data segments.  Force small data
	sections to the end of the list of data sections.  Force small BSS
	sections to the start of the list of BSS sections.  For large BSS
	sections to the end of the list of BSS sections.
	* symtab.h (class Symbol): Declare is_common_shndx.
	(Symbol::is_defined): Check Symbol::is_common_shndx.
	(Symbol::is_common): Likewise.
	(class Symbol_table): Define enum Commons_section_type.  Update
	declarations.  Add small_commons_ and large_commons_ fields.
	* symtab.cc (Symbol::is_common_shndx): New function.
	(Symbol_table::Symbol_table): Initialize new fields.
	(Symbol_table::add_from_object): Put small and large common
	symbols in the right list.
	(Symbol_table::sized_finalized_symbol): Check
	Symbol::is_common_shndx.
	(Symbol_table::sized_write_globals): Likewise.
	* common.cc (Symbol_table::do_allocate_commons): Allocate new
	common symbol lists.  Don't call do_allocate_commons_list if the
	list is empty.
	(Symbol_table::do_allocate_commons_list): Remove is_tls
	parameter.  Add comons_section_type parameter.  Change all
	callers.  Handle small and large common symbols.
	* object.cc (Sized_relobj::do_finalize_local_symbols): Check
	Symbol::is_common_shndx.
	* resolve.cc (symbol_to_bits): Likewise.
	* target.h (Target::small_common_shndx): New function.
	(Target::small_common_section_flags): New function.
	(Target::large_common_shndx): New function.
	(Target::large_common_section_flags): New function.
	(Target::new_output_section): New function.
	(Target::Target_info): Add small_common_shndx, large_common_shndx,
	small_common_section_flags, and large_common_section_flags
	fields.
	(Target::do_new_output_section): New virtual function.
	* arm.cc (Target_arm::arm_info): Initialize new fields.
	* i386.cc (Target_i386::i386_info): Likewise.
	* powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
	Likewise.
	* sparc.c (Target_sparc::sparc_info) [all versions]: Likewise.
	* x86_64.cc (Target_x86_64::x86_64_info): Likewise.
	(Target_x86_64::do_new_output_section): New function.
	* configure.ac: Define conditional MCMODEL_MEDIUM.
	* testsuite/Makefile.am (check_PROGRAMS): Add large.
	(large_SOURCES, large_CFLAGS, large_DEPENDENCIES): Define.
	(large_LDFLAGS): Define.
	* testsuite/large.c: New file.
	* testsuite/testfile.cc (Target_test::test_target_info):
	Initialize new fields.
	* configure, testsuite/Makefile.in: Rebuild.
2009-06-22 06:51:53 +00:00
Doug Kwan bb04269c74 2009-06-05 Doug Kwan <dougkwan@google.com>
* Makefile.am (CCFILES): Add target.cc.
	* Makefile.in: Regenerate.
	* i386.cc (class Target_i386): Define new virtual method to
	override do_is_local_label_name in parent.
	* object.cc (Sized_relobj::do_count_local_symbols): Discard
	local symbols if --discard-locals or -X is given.
	* options.h (class General_options): Declare new options
	'--discard-locals' and '-X' for discarding locals.
	* target.h (class Target): Define new methods is_local_label_name.
	Declare new virtual method do_is_local_label_name.
	* target.cc: New file.
	* testsuite/Makefile.am (check_PROGRAMS): Add discard_locals_test.
	(check_SCRIPTS): Add discard_locals_test.sh.
	(check_DATA): Add discard_local_tests.syms.
	(discard_locals_test_SOURCES, discard_locals_test_LDFLAGS): Define.
	(discard_local_tests.syms, discard_locals_test.o): New make rules.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/discard_locals_test.c: New file.
	* testsuite/discard_locals_test.sh: Same.
2009-06-05 21:32:57 +00:00
Doug Kwan 805bb01c4b 2009-06-05 Doug Kwan <dougkwan@google.com>
* object.cc (Sized_relobj::Sized_relobj): Initialize
	discarded_eh_frame_shndx_ to -1U.
	(Sized_relobj::do_layout): Record index of a discard .eh_frame
	section.
	(Sized_relobj::do_count_local_symbols): Skip local symbols in
	a discarded .eh_frame section.
	(Sized_relobj::do_finalize_local_symbols): Ditto.
	* object.h (class Sized_relobj): Declare new member
	discarded_eh_frame_shndx_.
	* testsuite/Makefile.am (check_PROGRAMS): Add local_labels_test.
	(local_labels_test.o, local_labels_test): New rules.
	* testsuite/Makefile.in: Regenerate.
2009-06-05 18:16:31 +00:00
Doug Kwan 1dcd334d34 2009-06-04 Doug Kwan <dougkwan@google.com>
* layout.cc (Layout::section_name_mapping): Add mapping for
	special ARM sections.
2009-06-04 21:14:11 +00:00
Doug Kwan 96d493066d 2009-06-03 Doug Kwan <dougkwan@google.com>
* arm.cc (utils::sign_extend): Reverse test in gold_assert.
	(utils::has_overflow): Same.
2009-06-04 01:31:01 +00:00
Ian Lance Taylor dff1629750 * layout.cc (Layout::section_name_mapping): New array, replacing
Layout::linkonce_mapping.
	(Layout::section_name_mapping_count): New variable, replacing
	Layout::linkonce_mapping_count.
	(Layout::linkonce_output_name): Remove.
	(Layout::output_section_name): Rewrite.
	* layout.h (class Layout): Rename Linkonce_mapping to
	Section_name_mapping, linkonce_mapping to section_name_mapping,
	linkonce_mapping_count to section_name_mapping_count.  Don't
	declare linkonce_output_name.
2009-06-04 00:43:11 +00:00
Doug Kwan c121c67179 2009-06-03 Doug Kwan <dougkwan@google.com>
* gold/arm.cc (namespace utils): New.
	(Target_arm::reloc_is_non_pic): Define new method.
	(class Arm_relocate_functions): New.
	(Target_arm::Relocate::relocate): Handle relocation types used by
	Android.
2009-06-03 19:33:05 +00:00
Ian Lance Taylor 07800fab6e * arm.cc (Target_arm::scan::global): Use || instead of |. 2009-06-03 14:05:07 +00:00
Doug Kwan bec53400ce 2009-06-02 Doug Kwan <dougkwan@google.com>
* gold/arm.cc (Target_arm::Scan::Scan):  Initialize
	issued_non_pic_error_.
	(class Target_arm::Scan): Declare new method check_non_pic.
	Define new method symbol_needs_plt_entry.
	Declare new data member issued_non_pic_error_.
	(class Target_arm::Relocate): Declare new method
	should_apply_static_reloc.
	(Target_arm::may_need_copy_reloc): Handle STT_ARM_TFUNC.
	(Target_arm::Scan::check_non_pic): Define new method.
	(Target_arm::Scan::local): Handle a small subset of reloc types used
	by Android.
	(Target_arm::Scan::local): Same.
	(Target_arm::Relocate::should_apply_statci_reloc): Define new method.
2009-06-03 00:06:15 +00:00
Ian Lance Taylor b19b0c6d0f * incremental.cc (Incremental_inputs::report_command_line): Filter
out --incremental-* options.
2009-05-31 23:07:26 +00:00
Doug Kwan 94cdfcffc3 2009-05-29 Doug Kwan <dougkwan@google.com>
* gold/arm.cc (Output_data_plt_arm): Forward declaration for new
	template class.
	(class Target_arm): Update comment.
	(Target_arm::Target_arm): Initialize new data members GOT_,
	PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_ and DYNBSS_.
	Declare new methods Target_arm::got_section, Target_arm::make_plt_entry
	and Target_arm::rel_dyn_section.
	Declare new_enum Target_arm::Got_type.
	Declare new data members GOT_, PLT_, GOT_PLT_, REL_DYN_, COPY_RELOCS_
	and DYNBSS_.
	Update commments for member do_dynsym_value.
	(Target_arm::got_size, Target_arm::plt_section,
	Target_arm::may_need_copy_reloc and Target_arm::copy_reloc): Define
	new methods inside class defintion.
	(Target_arm::got_section): Define new method.
	(Target_arm::rel_dyn_section): Same.
	(Output_data_plt_arm): New template class.
	(Output_data_plt_arm::Output_data_plt_arm): Define constructor.
	(Output_data_plt_arm:do_adjust_output_section): Define new method.
	(Output_data_plt_arm::add_entry): Same.
	(Output_data_plt_arm::first_plt_entry): Define new
	static data member for PLT instruction template.
	(Output_data_plt_arm::plt_entry): Same.
	(Output_data_plt_arm::do_write): Define new method.
	(Target_arm::make_plt_entry): Same.
	(Target_arm::do_finalize_sections): Same.
	(Target_arm::do_dynsym_value): Same.
2009-05-30 00:55:42 +00:00
Doug Kwan 4a657b0d92 2009-05-28 Doug Kwan <dougkwan@google.com>
* configure.ac: Support gold for target arm*-*-*.
        * configure: Regenerate.
        * gold/Makefile.am (TARGETSOURCES): Add arm.cc.
        (ALL_TARGETOBJECTS): Add arm.$(OBJEXT)
        * gold/Makefile.in: Regenerate.
        * gold/arm.cc: New file.
        * gold/configure.tgt: Add armbe*-*-*, armeb*-*-* and arm*-*-* targets.
2009-05-29 00:15:12 +00:00
Doug Kwan e7ae8c368d Add missing ChangeLog entry in previous check-in 2009-05-26 23:05:00 +00:00
Doug Kwan 2fdd743f6d 2009-05-26 Doug Kwan <dougkwan@google.com>
* options.cc (General_options::parse_exclude_libs).  Fix a comment.
        (General_options::check_excluded_libs): Strip off directories in
        archive name before matching like GNU ld does.
        * testsuite/Makefile.am (MOSTLYCLEANFILES,
        exclude_libs_test_DEPENDENCIES): Add alt/libexclude_libs_test_3.a
        (exclude_libs_test_LDFLAGS): Add linker option
        -Wl,--exclude-libs,libexclude_libs_test_3
        (exclude_libs_test_LADD): Add alt/libexclude_libs_test_3.a as
        an explicit archive without using -l.
        (alt/libexclude_libs_test_3.a): New make rule.
        * testsuite/Makefile.in: Regenerate.
        * testsuite/exclude_libs_test.c : Declare lib3_default().
        (main): Call it.
        * exclude_libs_test.sh: Add tests for alt/exclude_libs_test_3.a.
        * exclude_libs_test_3.c: New file.
2009-05-26 22:52:56 +00:00
Nick Clifton f12e7348b2 Update Indonesian translations.
Update translation templates.
2009-05-26 16:49:41 +00:00
Sriraman Tallam 4daadc0d02 * testsuite/Makefile.am: Add -ffunction-sections to compile
gc_comdat_test files.  Add -Wl,--gc-sections to build
	gc_comdat_test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/gc_comdat_test.sh: Fix the condition around grep.
2009-05-22 20:27:52 +00:00
Sriraman Tallam 531813adfc * object.cc (Sized_relobj::map_to_kept_section): Return NULL if the
kept comdat section was garbage collected.
	* testsuite/Makefile.am: Add test gc_comdat_test.sh.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/gc_comdat_test.sh: New file.
	* testsuite/gc_comdat_test_1.cc: New file.
	* testsuite/gc_comdat_test_2.cc: New file.
2009-05-22 18:31:22 +00:00
Cary Coutant 6551490093 2009-05-19 Doug Kwan <dougkwan@google.com>
* archive.cc (Archive::Archive): Move constructor from archive.h
	to here.  Initialize no_export_.
	(Archive::get_elf_object_for_member): Set no_export flag of object.
	* archive.h (Archive::Archive): Move constructor body to
	archive.cc.
	(Archive::no_export): New method.
	(Archive::no_export_): New field.
	* object.h (Object::Object): Initialize no_export_ to false.
	(Object::no_export, Object::set_no_export): New methods.
	(Object::no_export_): New field.
	* options.cc (General_options::parse_exclude_libs): New method.
	(General_options::check_excluded_libs) Same.
	* options.h (exclude_libs): New option.
	(General_options::check_excluded_libs): New method declaration.
	(General_options::excluded_libs_): New field.
	* symtab.cc (Symbol_table::add_from_relobj): Hide symbols with
	default or protected visibility if an object has no-export flag set.
	testsuite/Makefile.am (check_PROGRAMS): Add exclude_libs_test.
	(check_SCRIPTS): Add exclude_libs_test.sh.
	(check_DATA): Add exclude_libs_test.syms.
	(MOSTLYCLEANFILES): Add exclude_libs_test.syms,
	libexclude_libs_test_1.a and libexclude_libs_test_2.a.
	(exclude_libs_test_SOURCES, exclude_libs_test_DEPENDENCIES,
	exclude_libs_test_LDFLAGS and exclude_libs_test_LDADD): Define.
	(exclude_libs_test.syms, libexclude_libs_test_1.a,
	libexclude_libs_test_2.a): New rules.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/exclude_libs_test.c: New file.
	* testsuite/exclude_libs_test.sh: Ditto.
	* testsuite/exclude_libs_test_1.c: Ditto.
	* testsuite/exclude_libs_test_2.c: Ditto.
2009-05-19 22:14:17 +00:00
Ian Lance Taylor 1b77ea505f * configure.ac: Check for declarations for cases where libiberty.h
checks HAVE_DECL_xxx.
	* configure, config.in: Rebuild.
2009-05-15 18:32:13 +00:00
Ian Lance Taylor 072fe7ce7a * gold.h (Incremental_argument_list): Remove (invalid) forward
declaration.
	* incremental.cc (Incremental_inputs::report_achive): New method.
	(Incremental_inputs::report_object): New method.
	(Incremental_inputs::report_script): New method.
	(Incremental_inputs::finalize_inputs): New method.
	(Incremental_inputs::finalize): Call finalize_inputs().
	(Incremental_inputs::sized_create_incremental_inputs_section_data):
	Create inputs entries.
	* incremental.h (Incremental_input_type): New enum.
	(Incremental_inputs::Incremental_input): Initialize new fields.
	(Incremental_inputs::report_inputs): New method.
	(Incremental_inputs::report_achive): New method.
	(Incremental_inputs::report_object): New method.
	(Incremental_inputs::report_script): New method.
	(Incremental_inputs::finalize_inputs): New method.
	(Incremental_inputs::Input_info): New struct.
	(Incremental_inputs::Input_info_map): New typedef.
	(Incremental_inputs::lock_): New field.
	(Incremental_inputs::Inputs_): New field.
	(Incremental_inputs::Inputs_map): New field.
	* main.cc (main): Call Incremental_input::report_inputs.
	* options.h (Input_argument_list): Typedef moved from
	Input_arguments.
	(Input_file_group::Files): Remove, use ::Input_argument_list.
	(Input_file_group::Input_argument_list): Remove, use
	::Input_argument_list.
	* plugin.cc (Plugin_manager::add_input_file): Add error in
	incremental build.
	* read_syms.cc (do_read_syms): Call Incremental_input::report_*
	functions.
	* script.cc (read_input_script): Call
	Incremental_input::report_script.
	* script.h (Script_info): New class.
2009-05-15 17:01:04 +00:00
Chris Demetriou b22a5a4185 Fix date in revision 1.220. (Was 2008-04-23, should have been 2009-04-23). 2009-04-30 06:02:09 +00:00
Ian Lance Taylor b0481b0b2c * x86_64.cc (do_adjust_output_section): Set entsize to
plt_entry_size.
2009-04-27 16:23:57 +00:00
Chris Demetriou 6d1e3092b4 2008-04-23 Elliott Hughes <enh@google.com>
* output.cc (Output_file::close): After short writes, continue
        writing from the correct offset in the buffer being written.
2009-04-24 19:48:21 +00:00
Chris Demetriou 40fde48809 2009-04-23 Chris Demetriou <cgd@google.com>
* configure.ac (HAVE_TR1_UNORDERED_MAP_REHASH): New define.
        * configure: Regenerate.
        * config.in: Regenerate.
        * gold.h: Avoid std::tr1::unordered_map and std::tr1::unordered_set
        if HAVE_TR1_UNORDERED_MAP_REHASH is not defined.
2009-04-24 19:33:42 +00:00
Ian Lance Taylor 3ce2c28e3f * incremental.cc (Incremental_inputs_header_data): Renamed from
Incremental_input_header_data.
	(Incremental_inputs_header_data::data_size): New field.
	(Incremental_inputs_header_data::put_input_file_count): Renamed
	from input_file_count.
	(Incremental_inputs_header_data::put_command_line_offset): Renamed
	from command_line_offset.
	(Incremental_inputs_header_data::put_reserved): Renamed from
	put_reserved.
	(Incremental_inputs_entry_data): Renamed from
	Incremental_input_entry_data.
	(Incremental_inputs_entry_data::data_size): New field.
	(Incremental_inputs::report_command_line): New method.
	(Incremental_inputs::finalize): New method.
	(Incremental_inputs::create_incremental_inputs_data): New method.
	(Incremental_inputs::sized_create_incremental_inputs_data): New method.
	* incremental.h: New file.
	* layout.cc (Layout::Layout): Handle new incremental_inputs_.
       (Layout::finalize): Create incremental inputs section in
	incremental builds.
       (Layout::create_incremental_info_sections): New method.
	* layout.h (Layout::incremental_inputs): New method.
       (Layout::create_incremental_info_sections): New method.
       (Layout::incremental_inputs_): New field.
	* main.cc (main): Notify Incremental_input of the command line.
2009-04-24 15:44:02 +00:00
Ian Lance Taylor e55bde5eb0 * gold.h (reserve_unordered_map): Define, three versions, one for
each version of Unordered_map.
	* layout.cc (Layout::Layout): Remove options parameter.  Add
	number_of_input_files parameter.  Don't initialize options_.
	Initialize number_of_input_files_ and resized_signatures_.  Move
	sections_are_attached_.
	(Layout::layout_group): Reserve space for group_signatures_.
	(Layout::find_or_add_kept_section): Change name parameter to be a
	reference.  Resize signatures_ map when it gets large enough.
	(Layout::layout_eh_frame): Use parameters->options() instead of
	this->options_.
	(Layout::make_output_section): Likewise.
	(Layout::attach_allocated_section_to_segment): Likewise.
	(Layout::finalize, Layout::create_executable_stack): Likewise.
	(Layout::set_segment_offsets, Layout::create_interp): Likewise.
	(Layout::finish_dynamic_section, Layout::write_binary): Likewise.
	* layout.h (class Layout): Update declarations.  Remove options_
	field.  Add number_of_input_files_ and resized_signatures_
	fields.  Move sections_are_attached_ field.
	* main.cc (main): Pass number of input files to Layout
	constructor.  Don't pass options.
2009-04-02 04:19:03 +00:00
Ian Lance Taylor 154b857c95 * ffsll.c (ffsll): Correct implementation. 2009-03-30 23:17:11 +00:00
Ian Lance Taylor fd03461a93 * ffsll.c: New file.
* configure.ac: Call AC_REPLACE_FUNCS on ffsll.
	* gold.h (ffsll): Declare if HAVE_FFSLL is not defined.
	* ftruncate.c (ftruncate): Declare before definition.
	* mremap.c (mremap): Likewise.
	* pread.c (pread): Likewise.
	* configure, Makefile.in, config.in: Rebuild.
2009-03-28 05:22:30 +00:00
Ian Lance Taylor 2f35ab9b82 * mremap.c: New file.
* configure.ac: Call AC_REPLACE_FUNCS on mremap.
	* gold.h (MREMAP_MAYMOVE): Define if HAVE_MREMAP is not defined.
	(mremap): Declare if HAVE_MREMAP is not defined.
	* configure, Makefile.in, config.in: Rebuild.
2009-03-27 23:21:09 +00:00
Cary Coutant 33aea2fd65 * powerpc.cc (Target_powerpc::check_non_pic): Assert that output is
position independent.
	* sparc.cc (Target_sparc::check_non_pic): Likewise.
	* x86_64.cc (Target_x86_64::check_non_pic): Likewise.
2009-03-27 18:19:09 +00:00
Cary Coutant 6d4796192d * symtab.h (needs_plt_entry): Check for unsatisfied reference from
an executable.
	(needs_dynamic_reloc): Likewise.
2009-03-25 01:34:25 +00:00