* fileread.cc: (File_read::View::~View): Use the new
[deliverable/binutils-gdb.git] / gold / ChangeLog
index b39634dba8f2d49a633bf00ef7170eb862d28e40..56991ab65c5a6f1247cf704852d9bad08d876b98 100644 (file)
@@ -1,3 +1,286 @@
+2009-10-27  Mikolaj Zalewski  <mikolajz@google.com>
+
+       * fileread.cc: (File_read::View::~View): Use the new
+       data_ownership_ filed.
+       (File_read::~File_read): Dispose the new whole_file_view_.
+       (File_read::open): Mmap the whole file if needed.
+       (File_read::open): Use whole_file_view_ instead of contents_.
+       (File_read::find_view): Use whole_file_view_ if applicable.
+       (File_read::do_read): Use whole_file_view_ instead of contents_.
+       (File_read::make_view): Use whole_file_view_ instead of contents_,
+       update File_read::View::View call.
+       (File_read::find_or_make_view): Update File_read::View::View
+       call.
+       * fileread.h: (File_read::File_read): Initialize whole_file_view_,
+       remove contents_
+       (File_read::View::Data_ownership): New enum.
+       (File_read::View::View): Replace bool mapped_ with Data_ownership
+       argument.
+       (File_read::View::mapped_): Remove (replaced by data_ownership_).
+       (File_read::View::data_ownership_): New field.
+       (File_read::contents_): Remove (replaced by whole_file_view_).
+       (File_read::whole_file_view_): New field.
+       * options.h (class General_options): Add --keep-files-mapped.
+
+2009-10-27  Cary Coutant  <ccoutant@google.com>
+
+       * symtab.cc (add_from_pluginobj): Pass correct value for is_ordinary.
+       * testsuite/Makefile.am (plugin_test_5): New test case.
+       * testsuite/Makefile.in: Regenerate.
+
+2009-10-25  Doug Kwan  <dougkwan@google.com>
+
+       * object.h (Sized_relobj::View_size, Sized_relobj::Views): Change
+       from private to protected to allow access by child class.
+       (Sized_relobj::do_relocate_sections): New method declaration.
+       (Sized_relobj::relocate_sections): Virtualize.
+       * reloc.cc (Sized_relobj::do_relocate_sections): Rename from 
+       Sized_relobj::relocate_sections.  Instantiate template explicitly
+       for different target sizes and endianity.
+
+2009-10-24  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc (Arm_output_section, Arm_relobj): Forward class declarations.
+       (Arm_input_section::as_arm_input_section): New method.
+       (Arm_output_section): New class definition.
+       (Arm_output_section::create_stub_group,
+       Arm_output_section::group_sections): New method definitions.
+
+2009-10-22  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc (Arm_input_section): New class definition.
+       (Arm_input_section::init, Arm_input_section:do_write,
+       Arm_input_section::set_final_data_size,
+       Arm_input_section::do_reset_address_and_file_offset): New method
+       definitions.
+
+2009-10-21  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc (Stub_table, Arm_input_section): New forward class
+       declarations.
+       (Stub_table): New class defintion.
+       (Stub_table::add_reloc_stub, Stub_table::relocate_stubs
+       Stub_table::do_reset_address_and_file_offset, Stub_table::do_write):
+       New method definition.
+
+2009-10-21  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc: Update copyright comments.
+       (Target_arm): New forward class template declaration.
+       (Arm_address): New type.
+       (ARM_MAX_FWD_BRANCH_OFFSET, ARM_MAX_BWD_BRANCH_OFFSET,
+       THM_MAX_FWD_BRANCH_OFFSET, THM_MAX_BWD_BRANCH_OFFSET,
+       THM2_MAX_FWD_BRANCH_OFFSET, THM2_MAX_BWD_BRANCH_OFFSET): New
+       constants.
+       (Insn_template): Same.
+       (DEF_STUBS): New macro.
+       (Stub_type): New enum type.
+       (Stub_template): New class definition.
+       (Stub): Same.
+       (Reloc_stub): Same.
+       (Stub_factory): Same.
+       (Target_arm::Target_arm): Initialize may_use_blx_ and
+       should_force_pic_veneer_.
+       (Target_arm::may_use_blx, Target_arm::set_may_use_blx,
+       Target_arm::should_force_pic_veneer,
+       Target_arm::set_should_force_pic_veneer, Target_arm::using_thumb2,
+       Target_arm::using_thumb_only, Target_arm:;default_target): New
+       method defintions.
+       (Target_arm::may_use_blx_, Target_arm::should_force_pic_veneer_):
+       New data member declarations.
+       (Insn_template::size, Insn_template::alignment): New method defintions.
+       (Stub_template::Stub_template): New method definition.
+       (Reloc_stub::Key::name, Reloc_stub::stub_type_for_reloc,
+       Reloc_stub::do_fixed_endian_write, Reloc_stub::do_write): Same.
+       (Stub_factory::Stub_factory): New method definition.
+       * gold.h (string_hash): New template.
+       * output.h (Input_section_specifier::hash_value): Use
+       gold::string_hash.
+       (Input_section_specifier::string_hash): Remove.
+       * stringpool.cc (Stringpool_template::string_hash): Use
+       gold::string_hash.
+
+2009-10-20  Doug Kwan  <dougkwan@google.com>
+
+       * object.cc (Sized_relobj::do_finalize_local_symbols): Handle section
+       symbols of relaxed input sections.
+       * output.h (Output_section::find_relaxed_input_section): Make
+       method public.
+
+2009-10-16  Doug Kwan  <dougkwan@google.com>
+
+       * dynobj.cc (Versions::Versions): Initialize version_script_.
+       Only insert base version symbol definition for a shared object
+       if version script defines any version versions.
+       (Versions::define_base_version): New method definition.
+       (Versions::add_def): Check that base version is not needed.
+       (Versions::add_need): Define base version lazily.
+       * dynobj.h (Versions::define_base_version): New method declaration.
+       (Versions::needs_base_version_): New data member declaration.
+       * testsuite/Makefile.am (check_SCRIPTS): Add no_version_test.sh
+       (check_DATA): Add no_version_test.stdout.
+       (libno_version_test.so, no_version_test.o no_version_test.stdout):
+       New make rules.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/no_version_test.c: New file.
+       * testsuite/no_version_test.sh: Ditto.
+
+2009-10-16  Doug Kwan  <dougkwan@google.com>
+
+       * expression.cc (class Segment_start_expression): New class definition.
+       (Segment_start_expression::value): New method definition.
+       (script_exp_function_segment_start): Return a new
+       Segment_start_expression.
+       * gold/script-c.h (script_saw_segment_start_expression): New function
+       prototype.
+       * script-sections.cc (Script_sections::Script_sections): Initialize
+       SAW_SEGMENT_START_EXPRESSION_ to false.
+       (Script_sections::set_section_addresses): Use -Ttext, -Tdata
+       and -Tbbs options to specify section addresses if given in
+       command line and no SEGMENT_START expression is seen in a script.
+       * script-sections.h (Script_sections::saw_segment_start_expression,
+       Script_sections::set_saw_segment_start_expression): New method
+       definition.
+       (Script_sections::saw_segment_start_expression_): New data member
+       declaration.
+       * script.cc (script_saw_segment_start_expression): New function.
+       * yyscript.y (SEGMENT_START): Call script_saw_segment_start_expression.
+       * testsuite/Makefile.am (check_SCRIPTS): Add script_test_6.sh,
+       script_test_7.sh and script_test_8.sh.
+       (check_DATA): Add script_test_6.stdout, script_test_7.stdout and
+       script_test_8.stdout.
+       (MOSTLYCLEANFILES): Add script_test_6, script_test_7 and script_test_8.
+       (script_test_6, script_test_6.stdout, script_test_7,
+       script_test_7.stdout, script_test_8, script_test_8.stdout): New rules.
+       * Makefile.in: Regenerate.
+       * testsuite/script_test_6.sh: New file.
+       * testsuite/script_test_6.t: Same.
+       * testsuite/script_test_7.sh: Same.
+       * testsuite/script_test_7.t: Same.
+       * testsuite/script_test_8.sh: Same.
+
+2009-10-16  Doug Kwan  <dougkwan@google.com>
+
+       * output.cc (Output_segment::set_section_list_address): Cast
+       expressions to unsigned long long type to avoid format warnings.
+
+2009-10-15  Ian Lance Taylor  <iant@google.com>
+
+       * script.cc (Script_options::add_symbol_assignment): Always add a
+       dot assginment to script_sections_.
+       * script-sections.cc (Script_sections::add_dot_assignment):
+       Initialize if necessary.
+
+       * layout.cc (Layout::relaxation_loop_body): Don't crash if we see
+       program headers with no load segment if there is a linker script.
+
+       * layout.cc (Layout::set_segment_offsets): Align the file offset
+       to the segment aligment for -N or -n with no load segment.
+       * output.cc (Output_segment::add_output_section): Don't crash if
+       the first section is a TLS section.
+       (Output_segment::set_section_list_addresses): Print an error
+       message if the address moves backward in a linker script.
+       * script-sections.cc
+       (Output_section_element_input::set_section_addresses): Don't
+       increase *dot_value for a SHF_TLS/SHT_NOBITS section.
+       (Orphan_output_section::set_section_addresses): Likewise.
+
+2009-10-15  Doug Kwan  <dougkwan@google.com>
+
+       * layout.cc (Layout::finish_dynamic_section): Generate tags
+       DT_FINI_ARRAY, DT_FINI_ARRAYSZ, DT_INIT_ARRAY, DT_INIT_ARRAYSZ,
+       DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ as needed. If -Bsymbolic is
+       used, add DT_SYMBOLIC and set DF_SYMBOLIC in DT_FLAGS.
+
+2009-10-14  Ian Lance Taylor  <iant@google.com>
+
+       * object.h (class Relocate_info): Add reloc_shdr and data_shdr
+       fields.
+       * object.cc (Sized_relobj::relocate_sections): Set reloc_shdr and
+       data_shdr fields of relinfo.
+       * i386.cc (class Target_i386::Relocate): Remove ldo_addrs_ field.
+       (Target_i386::Relocate::relocate_tls): Don't call fix_up_ldo.  For
+       R_386_TLS_LDO_32, adjust based on section flags.
+       (Target_i386::Relocate::fix_up_ldo): Remove.
+
+2009-10-13  Ian Lance Taylor  <iant@google.com>
+
+       Add support for -pie.
+       * options.h (class General_options): Add -pie and
+       --pic-executable.
+       (General_options::output_is_position_independent): Test -pie.
+       (General_options::output_is_executable): Return true if not shared
+       and not relocatable.
+       (General_options::output_is_pie): Remove.
+       * options.cc (General_options::finalize): Reject incompatible uses
+       of -pie.
+       * gold.cc (queue_middle_tasks): A -pie link is not static.
+       * symtab.h (Symbol::needs_plt_entry): Return false if -pie.
+       * symtab.cc (Symbol::final_value_is_known): Return false if
+       output_is_position_independent.
+       * layout.cc (Layout::set_segment_offsets): Start at address 0 if
+       output_is_position_independent.
+       * output.cc (Output_file_header::do_sized_write): Use ET_DYN if
+       output_is_position_independent.
+       * i386.cc (Output_data_plt_i386::do_write): Use the PIC PLT if
+       output_is_position_independent.
+       * testsuite/Makefile.am (check_PROGRAMS): Add basic_pie_test and
+       two_file_pie_test.
+       (basic_pie_test.o, basic_pie_test): New targets.
+       (two_file_test_1_pie.o, two_file_test_1b_pie.o): New targets.
+       (two_file_test_2_pie.o, two_file_test_main_pie.o): New targets.
+       (two_file_pie_test): New target.
+       * testsuite/Makefile.in: Rebuild.
+       * README: Remove note saying that -pie is not supported.
+
+2009-10-13  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
+
+       * options.h (class General_options): Add -init and -fini.
+       * layout.cc (Layout::finish_dynamic_section): Emit
+       given init and fini functions.
+
+2009-10-13  Sriraman Tallam  <tmsriram@google.com>
+
+       * gc.h (gc_process_relocs): Check if icf is enabled using new
+       function.
+       * gold.cc (queue_initial_tasks): Likewise.
+       (queue_middle_tasks): Likewise.
+       * object.cc (do_layout): Likewise.
+       * symtab.cc (is_section_folded): Likewise.
+       * main.cc (main): Likewise.
+       * reloc.cc (Read_relocs::run): Likewise.
+       (Sized_relobj::do_scan_relocs): Likewise.
+       * icf.cc (is_function_ctor_or_dtor): New function.
+       (Icf::find_identical_sections): Check if function is ctor or dtor when
+       safe icf is chosen.
+       * options.h (General_options::icf): Change option to be an enum.
+       (Icf_status): New enum.
+       (icf_enabled): New method.
+       (icf_safe_folding): New method.
+       (set_icf_status): New method.
+       (icf_status_): New variable.
+       * (options.cc) (General_options::finalize): Set icf_status_.
+       * testsuite/Makefile.am: Add commands to build icf_safe_test. Modify
+       icf_test and icf_keep_unique_test to use the --icf enum flag.
+       * testsuite/icf_safe_test.sh: New file.
+       * testsuite/icf_safe_test.cc: New file. 
+
+2009-10-12  Sriraman Tallam  <tmsriram@google.com>
+
+       * symtab.h: Check for GOLD_SYMTAB_H before header includes. Remove
+       includes to gc.h and icf.h.
+       * arm.cc: Include gc.h.
+       * gold.cc: Likewise.
+       * i386.cc: Likewise.
+       * powerpc.cc: Likewise.
+       * sparc.cc: Likewise.
+       * x86_64.cc: Likewise.
+       * gc.h: Include icf.h.
+
+2009-10-11  Ian Lance Taylor  <iant@google.com>
+
+       * plugin.cc: Include "gold.h" before other header files.
+
 2009-10-10  Chris Demetriou  <cgd@google.com>
 
        * options.h (Input_file_argument::Input_file_type): New enum.
This page took 0.026856 seconds and 4 git commands to generate.